3

When I specify \GraphInit, the \Edge command doesn't respect any options. In my case, I'd need to specify the color and line width.

In this example, I wanted to set one of the edges red and the other gray, and wanted thicker lines, but both edges stay black and thin.

\documentclass{article}

\usepackage{tkz-graph}

\begin{document}
\begin{tikzpicture}
  \GraphInit[vstyle=Welsh]
  \Vertices[unit=2]{circle}{1,2,3} 
  \AddVertexColor{gray!50}{1,2} \AddVertexColor{red!50}{3}

  \Edge[color=gray!50,lw=2pt](1)(2)
  \Edge[color=red!50,lw=2pt](1)(3)

\end{tikzpicture}
\end{document}

If I comment out \GraphInit, the options are respected but I won't get the 1,2,3 labels (plus, I do not want the labels in the vertices anyways).

Thanks for any help.

2

Use the LabelOut=true option in \Vertices[unit=2,LabelOut=true]{circle}{1,2,3}.

\documentclass{article}    
\usepackage{tkz-graph}    
\begin{document}

\begin{tikzpicture}
  %\GraphInit[vstyle=Welsh]
  \Vertices[unit=2,LabelOut=true]{circle}{1,2,3} 
  \AddVertexColor{gray!50}{1,2} \AddVertexColor{red!50}{3}

  \Edge[color=gray!50,lw=2pt](1)(2)
  \Edge[color=red!50,lw=2pt](1)(3)

\end{tikzpicture}

\end{document}

enter image description here

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.