Take the 2-minute tour ×
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 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

1 Answer 1

up vote 13 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 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.