graphHab function

Colored factor graph