Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question

1 Answer

up vote 4 down vote accepted

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.

share|improve this answer
Thank you very much. – Sazzad Bin Kamal Dec 26 '10 at 19:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.