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}
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}
  • 2
    Or simply \Edge[local,lw=1.6pt](1)(3) :) – hooy Mar 13 '16 at 14:10

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.