1

I have created a graph but i'm not able to add the label in the node, below my code

\begin{tikzpicture}
\SetGraphUnit{4}
\SetVertexArt
\renewcommand*{\VertexInnerSep}{8pt}
\renewcommand*{\VertexBallColor}{blue!50}
\Vertices{circle}{1,2,3,4,5,6,7,8}
\AddVertexColor{blue}{1,2,3,4,5,6,7,8}
\SetUpEdge[style={->,ultra thick},color=blue!50]
\Edge(1)(2)
\Edge(1)(3)
\Edge(1)(4)
\Edge(1)(5)
\Edge(1)(6)
\Edge(2)(3)
\Edge(2)(4)
\Edge(2)(5)
\Edge(2)(6)
\Edge(3)(4)
\Edge(3)(5)
\Edge(3)(6)
\Edge(4)(5)
\Edge(4)(6)
\Edge(5)(6)
\Edge(2)(6)
\Edge(2)(3)
\Edge(2)(1)
\Edge(2)(8)
\Edge(6)(3)
\Edge(6)(1)
\Edge(6)(8)
\Edge(3)(1)
\Edge(3)(8)
\Edge(1)(8)
\Edge(7)(8)
\Edge(5)(1)
\Edge(5)(6)
\Edge(5)(2)
\Edge(5)(7)
\Edge(1)(6)
\Edge(1)(2)
\Edge(1)(7)
\Edge(6)(2)
\Edge(6)(7)
\Edge(2)(7)
\end{tikzpicture}

Can you help me? Thanks in advance

BMWurm
  • 503
Marta
  • 129

1 Answers1

5

The art style, defined with \SetVertexArt, seems to hide the text labels from the vertices. If you instead of \SetVertexArt and \AddVertexColor{blue}{1,2,3,4,5,6,7,8} add \GraphInit[vstyle=Shade] you get a similar result, but with the labels visible.

(I may have messed up which edges are drawn, when changing to the \Edges macro. You had drawn several edges twice, so I tried removing those.)

enter image description here

\documentclass[border=5mm]{standalone}
\usepackage{tkz-graph}
\begin{document}
\begin{tikzpicture}
\GraphInit[vstyle=Shade]
\SetGraphUnit{4}
\renewcommand*{\VertexInnerSep}{8pt}
\renewcommand*{\VertexBallColor}{blue!50}
\Vertices{circle}{1,2,3,4,5,6,7,8}
\SetUpEdge[style={->,ultra thick},color=blue!50]
\Edges(
   1,2,
   1,3,
   1,4,
   1,5,
   1,6,
   1,7,
   1,8,
   2,1,
   2,3,
   2,4,
   2,5,
   2,6,
   2,7,
   2,8,
   3,1,
   3,4,
   3,5,
   3,6,
   3,8,
   4,5,
   4,6,
   5,1,
   5,2,
   5,6,
   5,7,
   6,1,
   6,2,
   6,3,
   6,7,
   6,8,
   7,8)
\end{tikzpicture}
\end{document}
Torbjørn T.
  • 206,688