2

I have this code which generate me a graph. How can I make line 1-3 to be thick?enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[top=2in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{circuitikz}
\usepackage{tkz-graph}

\begin{document}

\begin{tikzpicture}
\GraphInit[vstyle=Normal]
%   \tikzset{EdgeStyle/.style={post}}

% Vertices
\Vertex[x=0, y=0] {4}
\Vertex[x=4, y=4] {2}
\Vertex[x=0, y=4] {1}
\Vertex[x=2, y=2] {3}
% Edges 


\Edge(2)(1)
\Edge(1)(4)
\Edge(4)(3)
\Edge(1)(3)
\Edge(3)(2)

\end{tikzpicture}



\bibliographystyle{plain}

\end{document}
Stefan Pinnow
  • 29,535

1 Answers1

2

Method a: The style for edges can be redefined locally:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[top=2in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{tkz-graph}

\begin{document}
\begin{tikzpicture}
\GraphInit[vstyle=Normal]
  % Vertices
  \Vertex[x=0, y=0] {4}
  \Vertex[x=4, y=4] {2}
  \Vertex[x=0, y=4] {1}
  \Vertex[x=2, y=2] {3}

  % Edges
  \Edge(2)(1)
  \Edge(1)(4)
  \Edge(4)(3)
  \begin{scope}[EdgeStyle/.append style=ultra thick]
    \Edge(1)(3)
  \end{scope}
  \Edge(3)(2)
\end{tikzpicture}
\end{document}

Result

Or the line can be drawn with \draw with additional settings to EdgeStyle:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[top=2in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{tkz-graph}

\begin{document}
\begin{tikzpicture}
\GraphInit[vstyle=Normal]
  % Vertices
  \Vertex[x=0, y=0] {4}
  \Vertex[x=4, y=4] {2}
  \Vertex[x=0, y=4] {1}
  \Vertex[x=2, y=2] {3}

  % Edges
  \Edge(2)(1)
  \Edge(1)(4)
  \Edge(4)(3)
  \draw[EdgeStyle, ultra thick](1) -- (3);
  \Edge(3)(2)
\end{tikzpicture}
\end{document}
Heiko Oberdiek
  • 271,626