6

How can I draw two loops above a node? Here is my code:

\path (r) edge[loop above] node[left=1pt] {3} (r);
\path (r) edge[out=140, in=50, looseness=0.8, loop] node[above=3pt] {4} (r);

How can I make the 2nd loop bigger, so that I get more space in between the loops?

Thanks in advance

6

You want the distance key, which sets both min distance and max distance (ignoring any computation). If you want less control, you can just specify one of those two. For more information, check out section 44.3, "Curves", of the PGF manual.


An example:

\begin{tikzpicture}
  \node [draw,fill,circle,minimum size=.15cm] (r) at (0,0) {} ;
  \path (r) edge[loop above] node[left=1pt] {3} (r);
  \path (r) edge[ out=140, in=50
                , looseness=0.8, loop
                , distance=2cm, ->]
            node[above=3pt] {4} (r);
\end{tikzpicture}

This produces the picture

Two loops of different heights.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy