\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}
答案1
方法 a:可以局部重新定义边的样式:
\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}
\draw
或者可以使用以下附加设置来绘制线条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}