I am trying to illustrate a voltage graph construction of the Petersen graph. In practice, this means:
- The outer cycle will be labelled clockwise (a,0),...,(a,4) with arcs oriented in that order;
- The inner cycle will be labelled clockwise (b,0),...,(b,4) with arcs (b,0) -> (b,2), (b,1) -> (b,3), (b,2) -> (b,4) and (b,3) -> (b,0); and
- Each (a,i) will be joined to the corresponding (b,i) (in that direction).
I can almost accomplish this using the grpetersen macro and the following code:
\begin{tikzpicture}[->,>=triangle 45,rotate=90,scale=1.2,style=thick]
\newcommand{\aset}[2]{$\{#1,#2\}$}
\tikzset{VertexStyle/.style={draw,rectangle}}
\SetVertexNoLabel
\SetVertexMath
\SetUpVertex[MinSize=30pt]
\grPetersen[RA=3,RB=1.5]
% \SetUpEdge{style={->-}}
\AssignVertexLabel{a}{\textsl{(a,0)},\textsl{(a,4)},\textsl{(a,3)},\textsl{(a,2)},\textsl{(a,1)}}
\AssignVertexLabel{b}{\textsl{(b,0)},\textsl{(b,4)},\textsl{(b,3)},\textsl{(b,2)},\textsl{(b,1)}}
\end{tikzpicture}
However, the arcs on the outer cycle are oriented in the wrong direction, and I cannot see how to change them without changing the other, correctly-oriented arcs.
Any suggestions would be much appreciated.
It is part of tkzgraph/berge - refer to Altermundus' "Plotting named graphs". Here is a minimal document containing the above code.
\documentclass{article}
\usepackage{tkz-graph}
\usepackage{tkz-berge}
\begin{document}
\begin{tikzpicture}[->,>=triangle 45,rotate=90,scale=1.2,style=thick]
\newcommand{\aset}[2]{$\{#1,#2\}$}
\tikzset{VertexStyle/.style={draw,rectangle}}
\SetVertexNoLabel
\SetVertexMath
\SetUpVertex[MinSize=30pt]
\grPetersen[RA=3,RB=1.5]
% \SetUpEdge{style={->-}}
\AssignVertexLabel{a}{\textsl{(a,0)},\textsl{(a,4)},\textsl{(a,3)},\textsl{(a,2)},\textsl{(a,1)}}
\AssignVertexLabel{b}{\textsl{(b,0)},\textsl{(b,4)},\textsl{(b,3)},\textsl{(b,2)},\textsl{(b,1)}}
\end{tikzpicture}
\end{document}
\grPetersen
macro in thetkz-berge.sty
file... – Count Zero Aug 25 '12 at 19:00\grEmptyPetersen
. – Alain Matthes Aug 26 '12 at 15:48