0

I'm trying to draw a loop arrow beginning and ending at a point, but the arrow head is missing. Here's the code:

\begin{tikzpicture}

\node [circle,fill=black,inner sep=0,minimum size=4,label=below:\Large$P$] (P) at (0,0) {};
 
\draw (P) to [->,-stealth,thick,out=300,in=30,looseness=20] (P);

\end{tikzpicture}

What is shown is a loop but without the arrowhead. How to fix this so it shows the arrow head?

1
  • your P is too close so add yshift
    – js bibra
    Commented Sep 4, 2020 at 14:02

2 Answers 2

4

Do you want something like this ?

\documentclass[12pt]{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node [circle, draw] (P) at (0,0) {$P$};
\draw[->,>= stealth]  (P) edge [out=120,in=60,distance=15mm]   (P);
\end{tikzpicture}
\end{document} 

enter image description here

Closer to your original post you may also use :

\begin{tikzpicture}
\node [circle, draw, fill=black, label=below:$P$] (P) at (0,0) {};
\draw[->,>= stealth]  (P) edge [out=120,in=60,distance=15mm]   (P);
\end{tikzpicture}

to obtain

enter image description here

2
  • Thank you, I think the trick is to use "edge". Again, many thanks.
    – Julie
    Commented Sep 4, 2020 at 13:58
  • @Julie Yes nodes are connected by edges.
    – Denis
    Commented Sep 4, 2020 at 14:41
1

enter image description here

 \begin{tikzpicture}\tikzstyle{loop right} = [thick,->,>=stealth,  
    out=60,in=-60,looseness=20]
    
    
    \node [circle,fill=black,inner sep=0,minimum size=4pt,label= 
    {[yshift=-3pt]below:\Large$P$}] (P) at (0,0) {};
    
    \path (P) edge [loop right] (P);
    
 \end{tikzpicture}

You must log in to answer this question.

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