1

I have this graph, but, to be honest, it doesn't really look like a circle. Do you have any suggestions for making this graph look good and maybe more simply coded?

\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}
3
  • 1
    I have some suggestions but It's difficult to know exactly what you want. It's possible to get something with tkz-graph perhaps tkz-berge but in your case and with your code, better is to load only tikZ. I prefer another syntax but what you want ? another syntax or another shape for the graph ? Apr 25, 2012 at 10:08
  • I agree with Altermundus. A more proper way to approach might be defining a big circle node \node[dashed,circle,minimum size=x cm] {}; and then place nodes on the border of it such as \node (p4) at (a.120) {};. Notice that the angle is understood by (nodename.angle) syntax.
    – percusse
    Apr 25, 2012 at 10:13
  • One missing subtlety is that minimum size=5cm does not become 10 cm when scaled, either you explicitly give a high number or you add transform shape option. Or you don't draw the big node but only put it. Later put a plain dashed circle later such that it obeys the scale option
    – percusse
    Apr 25, 2012 at 10:15

1 Answer 1

3

How about using arc insteat of 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}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .