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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I draw a dashed loop in TikZ? I tried

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
  \node (X) [circle, draw] {X};
  \draw (X) to [in=60, out=120, dashed, loop] ();
\end{tikzpicture}
\end{document}

Unfortunately, the loop only "listens" to the options in and out, but not to dashed. The resulting loop is not dashed:

enter image description here

share|improve this question
up vote 14 down vote accepted

Well it seems you messed with drawing arguments. If you do

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
  \node (X) [circle, draw] {X};
  \draw[dashed] (X) to [in=60, out=120, loop] ();
\end{tikzpicture}
\end{document}

You'll get a nice dashed loop:

enter image description here

share|improve this answer
    
Thank you for the answer, which fixes my problem, and to Jubobs for the pictures. – Bruno Le Floch Jun 15 '14 at 19:55

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.