3

This question already has an answer here:

Ordinarily I draw graphs in tikz with:

\begin{tikzpicture}
    \Vertex[x=1,y=1]{x1}
    \Vertex[x=2,y=1]{x2}
    \Vertex[x=3,y=1]{x3}
    \Vertex[x=4,y=1]{x4}
    \Vertex[x=5,y=1]{x5}
    \Edge(x1)(x2)
    \Edge(x2)(x3)
    \Edge(x3)(x4)
    \Edge(x4)(x5)
\end{tikzpicture}

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.

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

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