Recreating Peterson graph with tkz graph?
Is this okay?
\documentclass[border=3mm]{standalone}
\usepackage{tkz-graph}
\usepackage{tkz-berge}
\definecolor{iceberg}{rgb}{0.44, 0.65, 0.82}
\tikzstyle{VertexStyle} = [shape = circle, fill=iceberg,
minimum size = 8pt,
draw]
\renewcommand*{\VertexInnerSep}{8pt}
\SetVertexLabel\SetVertexMath
\makeatletter
\newcommand*{\grPetersenm}[1][]{%
\begingroup%
\setkeys[GR]{cl}{#1}%
\grCycle[#1]{6}
\begin{scope}[rotate=120]
\edef\tkzb@rtemp{\cmdGR@cl@RB}
\edef\tkzb@ptemp{\cmdGR@cl@prefixx}
\grStar[#1,RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{4}
\end{scope}
\setcounter{tkz@gr@a}{2}
\foreach \V@x in {0,...,5}{%
\ifthenelse{\equal{\thetkz@gr@a}{-1}}{%
\setcounter{tkz@gr@a}{2}}{%
}%
\ifodd\V@x
\tikzset{EdgeStyle/.append style = {bend right}}\fi
\Edge(\cmdGR@cl@prefix\V@x)(\cmdGR@cl@prefixx\thetkz@gr@a)
\addtocounter{tkz@gr@a}{-1}%
}%
\endgroup%
}
\makeatother
\begin{document}
\begin{tikzpicture}[scale=0.7,rotate=90]
\grGeneralizedPetersen[Math,prefix=u,RA=7,RB=4]{5}{2}
\end{tikzpicture}
\begin{tikzpicture}[scale=0.7,rotate=90]%
\grPetersenm[prefix=v,RA=7,RB=3]%
\end{tikzpicture}
\end{document}
EDIT
Changing the labels involve redefining few more macros. I think tikz-only solution would be easier. You can try something like this:
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\definecolor{iceberg}{rgb}{0.44, 0.65, 0.82}
\tikzstyle{VertexStyle} = [shape = circle, fill=iceberg,minimum size = 8mm,draw]
\tikzstyle{EdgeStyle} = [line width=1pt]
\begin{document}
\begin{tikzpicture}[scale=0.7,rotate=90]
\draw[EdgeStyle] (287:4cm) node[VertexStyle](u10){$u_{10}$} -- ++(287:4cm) node[VertexStyle](u1){$u_1$};
\draw[EdgeStyle] (0:4cm) node[VertexStyle](u9){$u_9$} -- ++(0:4cm) node[VertexStyle](u2){$u_2$};
\draw[EdgeStyle] (72:4cm) node[VertexStyle](u8){$u_8$} -- ++(72:4cm) node[VertexStyle](u3){$u_3$};
\draw[EdgeStyle] (144:4cm) node[VertexStyle](u7){$u_7$} -- ++(144:4cm) node[VertexStyle](u4){$u_4$};
\draw[EdgeStyle] (215:4cm) node[VertexStyle](u6){$u_6$} -- ++(215:4cm) node[VertexStyle](u5){$u_5$};
\draw[EdgeStyle] (u1) -- (u2) -- (u3) -- (u4) -- (u5)--(u1);
\draw[EdgeStyle] (u6) -- (u8) -- (u10) -- (u7) -- (u9)--(u6);
\end{tikzpicture}
\begin{tikzpicture}[scale=0.7,rotate=0]
\draw[EdgeStyle] (300:8cm) node[VertexStyle](v1){$v_{1}$} -- (0:8cm) node[VertexStyle](v2){$v_{2}$} -- (60:8cm) node[VertexStyle](v3){$v_{3}$} -- (120:8cm) node[VertexStyle](v4){$v_{4}$} -- (180:8cm) node[VertexStyle](v5){$v_{5}$} -- (240:8cm) node[VertexStyle](v6){$v_{6}$} --cycle;
\draw[EdgeStyle] (0:0cm) node[VertexStyle](v10){$v_{10}$} -- (0:4cm) node[VertexStyle](v8){$v_{8}$} -- (v2);
\draw[EdgeStyle] (v10) -- (0:4cm) node[VertexStyle](v8){$v_{8}$} -- (v2);
\draw[EdgeStyle] (v10) -- (120:4cm) node[VertexStyle](v9){$v_{9}$} -- (v4);
\draw[EdgeStyle] (v10) -- (240:4cm) node[VertexStyle](v7){$v_{7}$} -- (v6);
\draw[EdgeStyle] (v5) edge[bend right] (v8);
\draw[EdgeStyle] (v3) edge[bend right] (v7);
\draw[EdgeStyle] (v1) edge[bend right] (v9);
\end{tikzpicture}
\end{document}
Just with the right node labels and font …
\documentclass[border=5pt,tikz]{standalone}
\usetikzlibrary{backgrounds}
\usepackage{mathpazo}
\definecolor{iceberg}{rgb}{0.44, 0.65, 0.82}
\tikzset{
every node/.style={
fill=iceberg!40,draw,circle,minimum width=.5cm,font=\Large
}
}
\begin{document}
\begin{tikzpicture}
\foreach \x in {0,72,...,288}
{
\pgfmathsetmacro\index{\x/72+6}
\begin{pgfonlayer}{background}
\draw (\x+18:2) -- (\x+2*72+18:2);
\draw (\x+18:5) -- (\x+72+18:5);
\draw (\x+18:2) -- (\x+18:5);
\end{pgfonlayer}
\node at (\x+3*72+18:2) {$u_{\pgfmathprintnumber\index}$};
\pgfmathsetmacro\nindex{5-\x/72}
\node at (\x+3*72+18:5) {$u_{\pgfmathprintnumber\nindex}$};
}
\begin{scope}[xshift=12cm]
\foreach \x in {0,60,...,300}
{
\pgfmathsetmacro\index{6-\x/60}
\begin{pgfonlayer}{background}
\draw[rotate=30] (\x:5) -- (\x+60:5);
\foreach \x in {-30,90,210}
{
\draw (\x:5) -- (0,0);
}
\end{pgfonlayer}
\node at (\x+30+3*60:5) {$v_{\pgfmathprintnumber\index}$};
}
\foreach \x in {0,120,240}
{
\pgfmathsetmacro\index{9-\x/120}
\node at (\x-30:2.5) {$v_{\pgfmathprintnumber\index}$};
\begin{pgfonlayer}{background}
\draw (\x-30:2.5) to[bend left=30] (\x-30+180:5);
\end{pgfonlayer}
\node at (0,0) {$v_{10}$};
}
\end{scope}
\end{tikzpicture}
\end{document}
Output:
With only tkz-graph
\documentclass[border=3mm]{standalone}
\usepackage{tkz-berge}
\definecolor{iceberg}{rgb}{0.44, 0.65, 0.82}
\begin{document}
\begin{tikzpicture}[rotate=90]
\tikzset{VertexStyle/.style = {shape=circle,fill=iceberg,
minimum size = 20pt,draw}}
\SetVertexNoLabel
\grGeneralizedPetersen[prefix=u,prefixx=v,RA=7,RB=4]{5}{2}
\AssignVertexLabel{u}{$u_1$,$u_2$,$u_3$,$u_4$,$u_5$}
\AssignVertexLabel{v}{$u_{10}$,$u_6$,$u_7$,$u_8$,$u_9$}
\end{tikzpicture}
\end{document}
\documentclass[border=3mm]{standalone}
\usepackage{tkz-berge}
\definecolor{iceberg}{rgb}{0.44, 0.65, 0.82}
\begin{document}
\begin{tikzpicture}[rotate=90]
\tikzset{VertexStyle/.style = { shape=circle,fill=iceberg,
minimum size = 20pt,draw}}
\SetVertexNoLabel
\grEmptyStar[prefix=a,RA=6]{7}
\grEmptyCycle[prefix=b,RA=3]{3}
\AssignVertexLabel{a}{$v_2$,$v_1$,$v_6$,$v_5$,$v_4$,$v_3$,$v_{10}$}
\AssignVertexLabel{b}{$v_8$,$v_7$,$v_9$}
\Edges(a0,a1,a2,a3,a4,a5,a0)
\Edges(a0,b0,a6,b2,a4)
\Edges(a2,b1,a6)
\tikzset{EdgeStyle/.append style = {bend right}}
\Edges(a5,b1) \Edges(a3,b0) \Edges(a1,b2)
\end{tikzpicture}
\end{document}