Monday, August 03, 2009

Several options for the \Edge macro



\begin{tikzpicture}
\SetVertexNormal
\Vertex[x=0,y=2.5]{A}
{\tikzstyle{every node} = [node distance=1.5cm]
\Vertices[x=1.5,y=4,dir=\SO]{B,C,D}}
\Vertices[x=3,y=5,dir=\SO]{E,F,G,H,I,J}
\Vertices[x=4.5,y=5,dir=\SO]{K,L,M,N,O,P}
{\tikzstyle{every node} = [node distance=1.5cm]
\Vertices[x=6,y=4,dir=\SO]{Q,R,S}}
\Vertex[x=7.5,y=2.5]{T}
\Edges[color=red](A,B,E,K,Q,T,S,P,J,D,A)
\foreach \x/\y in {E/F,G/H,I/J,K/L,M/N,O/P}
{\Edge[color=green](\x)(\y)}
\Edge[style=->](I)(P)
\Edge[style=dashed](A)(C)
\Edge[style=dotted](C)(F)
\Edge[label=CD](C)(D)
\Edge[label=BC,labelcolor=yellow](B)(C)
\Edge[label=QR,labelcolor=orange,labeltext=cyan](Q)(R)
\Edge[label=RS,labelstyle=right](R)(S)
\Edge[label=OS,labelstyle={below=1pt,inner sep=0pt}](O)(S)
\Edge[label=LQ,labelstyle={above,font=\bfseries}](L)(Q)
\Edge[label=FL,labelstyle={font=\tiny\bfseries}](F)(L)
\Edge[label=GN,labelstyle={sloped,above}](G)(N)
\Edge[style={bend right}](A)(T)
\end{tikzpicture}

1 comment:

Sri said...

I am getting the following error:

" ! Undefined control sequence.
l.115 \SetVertexNormal

? " Can you help me? Thanks.