Skip to content

New versions of tkz-graph and tkz-berge

March 8, 2011

Finally, the much expected new versions (1.00 c) of tzk-graph and tkz-berge were released by Alain Matthes last week, and can be downloaded from Altermundus download zone.

I expect to post several examples using the new capabilities of the packages. For the time being, I will only say that:

  • \grCycle (and \grEmptyCycle) has an optional argument rotation that, well, rotates the cycle by the given degrees, hence eliminating the need to use the scope environment.
  • The commands like \SetUpVertex and \SetVertexNormal accept also several optional arguments, so that one can avoid setting styles with \tikzset.
  • All of the commands that draw Edges (except \EdgeDoubleMod, that has already nine arguments) can accept optional arguments, changing the look and/or style of the edge.

For example, the line graph of the Petersen graph can be drawn now as:

\begin{tikzpicture}
  \SetUpVertex[Style={font=\footnotesize\sffamily}]
  \SetVertexNormal[MinSize=12pt,InnerSep=0pt]
  \grCirculant[RA=0.6,prefix=a,rotation=-90]{5}{2}
  \grEmptyCycle[RA=1.5,prefix=b,rotation=-18]{5}{2}
  \grCycle[RA=2.5,prefix=c,rotation=18]{5}
  \EdgeIdentity[local,color=red]{a}{b}{5}
  \EdgeIdentity[local,lw=0.5pt]{b}{c}{5}
  {\tikzset{EdgeStyle/.append style = {blue,line width=3pt}}
  \EdgeDoubleMod{b}{5}{0}{1}{a}{5}{2}{1}{5}}
  {\tikzset{EdgeStyle/.append style = {green,line width=2pt}}
  \EdgeDoubleMod{c}{5}{0}{1}{b}{5}{1}{1}{5}}
\end{tikzpicture}

Line graph of the Petersen graph

About these ads
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: