2

someone could you give me an example to draw this graph? My difficulty is set lengths in each vertex, I use tkz-graph

Uncompleted example

\documentclass[tikz]{standalone}
\usepackage{tkz-graph}
\begin{document}
    \begin{tikzpicture}
        \SetGraphUnit{2}
        \GraphInit[vstyle=Classic]
        \SetVertexNoLabel
        \Vertex[x=0, y=0]{v1}
        \Vertex[x=10,y=0]{v2}
        \Vertex[x=5,y=0.5]{v3}
        \Edges(v1,v2,v3,v1)
        \Vertex[x=2.5,y=1]{v4}
        \Vertex[x=7.5,y=1]{v5}
        \Edges(v3,v4,v5,v3)
        \Vertex[x=4,y=1.5]{v6}
        \Vertex[x=8,y=1.5]{v7}
        %Continue ...
    \end{tikzpicture}
\end{document}

I think that there is another way to draw

Errera graph

All suggestions are welcome.

Thanks!

  • 2
    Did you check the graphdrawing library of TikZ in the manual? – percusse Jun 22 '18 at 0:18
  • 1
    @percusse I am not sure if the algorithms of the graphdrawing library are able to deal with an Errera graph, but I might be wrong. – marmot Jun 22 '18 at 0:54
  • Thanks @percusse, I found a presentation and a nice article of Graph Drawing in TikZ by Till Tantau and a poster from Graph Drawing and Network Visualization :) – Oromion Jun 22 '18 at 1:52
6

Luckily Mathematica has the graph data. Unfortunately, my French is practically nonexistent, so I cannot appreciate the benefits of that package.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tkz-graph}
\begin{document}
    \begin{tikzpicture}
        \SetGraphUnit{2}
        \GraphInit[vstyle=Classic]
        \SetVertexNoLabel
        \foreach \X/\Y [count=\Z] in {4/ 13, 4/ 6, -0.2/ 5, 2/ 2.2, -6/ -1, 6/ 2.2, 
    9.5/ 1.6, 2.7/ 5, 4.8/ 7.8, 4/ 10.4, -1.5/ 1.6, 14/ -1, 4/ 3.6, 
    5.3/ 5, 3.2/ 7.8, 4/ 0.3, 8.1/ 5}
        {\Vertex[x=\X,y=\Y]{v\Z}}
        \Edges(v2,v8,v13,v14,v2)
        \Edges(v5,v12,v16,v5)
        \Edges(v5,v11,v16,v7,v12)
        \Edges(v11,v4,v16,v6,v7)
        \Edges(v4,v8,v15,v10,v9,v14,v6)
        \Edges(v4,v13,v6,v4)
        \Edges(v13,v2,v15,v9,v2)
        \Edges(v3,v10,v17)
        \Edges(v11,v15,v3)
        \Edges(v7,v9,v17)
        \Edges(v5,v3,v11)
        \Edges(v12,v17,v7)
        \Edges(v5,v1,v12)
        \Edges(v3,v1,v17)
        \Edges(v1,v10)
        \Edges(v11,v8)
        \Edges(v7,v14)
    \end{tikzpicture}
\end{document}

enter image description here

  • Ingenious answer, @marmot please could you show how you got that data (if it's in Mathematica commands), I would also like to get your graphs from Solfer, Heawood. I think Mathematica has something similar to doc.sagemath.org/html/en/reference/graphs/sage/graphs/… – Oromion Jun 22 '18 at 3:02
  • @Oromion Here is the link to the Mathematica notebook. I just typed GraphData["ErreraGraph"] // InputForm and used a regex c & p to convert the vertices to the list in \foreach, and the edges I drew by hand because I figured that understanding the Mathematica syntax for that may take longer. – marmot Jun 22 '18 at 3:10
  • Fantastic, thank you so much, it works :) i.imgur.com/qbMWTCF.png – Oromion Jun 22 '18 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.