我有这个图表,但说实话,它看起来不像一个圆圈。您有什么建议可以让这个图表看起来更美观,或者让代码更简单吗?
\documentclass{report}
\usepackage{tkz-berge}
\begin{document}
\begin{tikzpicture}[scale=2, every node/.style={draw,shape=circle,scale=0.5}]
\path
(0:1cm) node (p2) {}
(45:1cm) node (p3) {}
(120:1cm) node (p4) {}
(240:1cm) node (p5) {}
(300:1cm) node (p6) {}
(0:2cm) node (u1) {}
(32:1.65cm) node (u2) {}
(120:2cm) node (u3) {}
(47:3cm) node (u4) {}
(51:3.9cm) node (u5) {};
\draw (p4) -- (u3)
(p2) -- (u1)
(p2) -- (u2)
(u2) -- (u4)
(u4) -- (u5);
\draw [dashed] (p2) to[bend right=18] (p3)
(p3) to[bend right] (p4)
(p4) to[bend right=55] (p5)
(p5) to[bend right=25] (p6)
(p6) to[bend right=25] (p2)
(p3) -- (u4)
(p4) -- (u4);
\end{tikzpicture}
\end{document}
答案1
arc
用代替怎么样to[bend=x]
?
\documentclass{report}
\usepackage{tkz-berge}
\begin{document}
\begin{tikzpicture}[scale=2, every node/.style={draw,shape=circle,scale=0.5}]
\path
(0:1cm) node (p2) {}
(45:1cm) node (p3) {}
(120:1cm) node (p4) {}
(240:1cm) node (p5) {}
(300:1cm) node (p6) {}
(0:2cm) node (u1) {}
(32:1.65cm) node (u2) {}
(120:2cm) node (u3) {}
(47:3cm) node (u4) {}
(51:3.9cm) node (u5) {};
\draw (p4) -- (u3)
(p2) -- (u1)
(p2) -- (u2)
(u2) -- (u4)
(u4) -- (u5);
\draw [dashed] (p2) arc(0:45:1)
(p3) arc (45:120:1)
(p4) arc (120:240:1)
(p5) arc (240:300:1)
(p6) arc (300:360:1)
(p3) -- (u4)
(p4) -- (u4);
\end{tikzpicture}
\end{document}