This question already has an answer here:

Ordinarily I draw graphs in tikz with:


Now I want to draw a factor graph, where the vertices are squares instead of circles. This is the only difference.

I can't, however, find out how. How do I?

marked as duplicate by Qrrbrbirlbel, Werner, cmhughes, Torbjørn T., Thorsten Oct 4 '13 at 6:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

\tikzset{VertexStyle/.style = {shape = rectangle,fill = gray}}

Not the answer you're looking for? Browse other questions tagged or ask your own question.