Options for vertices
October 17, 2011
This post is an update for this post from my old blog, which did not work with the newer versions of tkz-berge. The changes are:
- instead of
\tikzstyle{every node} = [node distance=1.5cm]one now has to use the macro:\SetGraphUnit{1.5}, - the macro
\Verticesneeds now an extra argument:{line}(another useful option here is{circle}) - the macro
\Edgesin line 16 needs the extra optionlocal, in order for the other options (the color red) to work.
\begin{tikzpicture}
\SetVertexNormal[LineColor=brown]
\Vertex[x=0,y=2.5,style=orange,LabelOut=true,Lpos=90]{A}
{\SetGraphUnit{1.5}
\Vertices[x=1.5,y=4,dir=\SO,LabelOut=true,Ldist=5pt]{line}{B,C,D}}
\Vertices[x=3,y=5,dir=\SO,style={shape=coordinate}]{line}{E,F,G,H,I,J}
\Vertices[x=4.5,y=5,dir=\SO,style={font=\bfseries}]{line}{K,L,M,N,O,P}
{\SetGraphUnit{1.5}
\Vertices[x=6,y=4,dir=\SO,
style={line width=2pt,
inner sep=0pt,
text=purple,
fill=yellow,
minimum size=12pt}]{line}{Q,R,S}}
\Vertex[x=7.5,y=2.5,style={shape=rectangle,blue}]{T}
\Edges[local,color=red,lw=2pt](A,B,E,K,Q,T,S,P,J,D,A)
\Edges(B,G,L,R,T)
\Edges(D,H,O,R)
\Edges(A,C,F,M,Q)
\Edges(C,I,N,S)
\foreach \x/\y in {E/F,G/H,I/J,K/L,M/N,O/P}
{\Edge(\x)(\y)}
\Edge[style={bend left}](G)(N)
\Edge[style={bend right}](A)(T)
\end{tikzpicture}
Advertisement
No comments yet
