0

I was trying to draw an edge without an arrow. When I do this:

\begin{tikzpicture}

\draw[thick] (0, 0) node[circle, draw](A) {};
\draw[thick] (A) edge[loop below] (A);
 
\end{tikzpicture}

I get an arrow even though I did not specify ">=" in the tikz code. I tried "edge[-,loop below]" and I still get the arrow. I also tried "edge[style={},loop below]". I finally removed the arrow by trying distance:

\begin{tikzpicture}

\draw[thick] (0, 0) node[circle, draw](A) {};
\draw[thick] (A) edge[loop below, distance=1cm] (A);
 
\end{tikzpicture}

Why does the distance turn off the arrow? Am I missing something here?

\documentclass{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\draw[thick] (0, 0) node[circle, draw](A) {};
\draw[thick] (A) edge[loop below] (A);
\end{tikzpicture}

\begin{tikzpicture}
\draw[thick] (0, 0) node[circle, draw](A) {};
\draw[thick] (A) edge[loop below, distance=1cm] (A);
\end{tikzpicture}

\end{document}
2

1 Answer 1

2

Not an answer, but inferring from the manual (75.4 Loops), it may be parsing logic (perhaps also interacting with the definition of edge[loop], but that's a guess).

Initial value is ->, and loop below and the others have no value set. Note that edge[distance=10pt,loop below] produces an arrow tip.

loop

MWE

\documentclass{article}
\usepackage{tikz}

\begin{document}
\center
\begin{tabular}{cc}
\begin{tikzpicture}
\draw[thick] (0, 0) node[circle, draw,pin={(A) edge[in=255,out=285,min distance=5mm] (A)}](A) {1};
\draw[thick] (A) edge[in=255,out=285,min distance=5mm] (A);
\end{tikzpicture} &
\begin{tikzpicture}
\draw[thick] (0, 0) node[circle, draw,pin={edge[->...}](A) {1};
\draw[thick] (A) edge[->,in=255,out=285,min distance=5mm] (A);
\end{tikzpicture}\\
\begin{tikzpicture}
\draw[thick] (0, 0) node[circle, draw,pin={(A) to [loop below] ()}](A) {2};
\draw[thick] (A) to [loop below] ();
\end{tikzpicture} &
\begin{tikzpicture}
\draw[thick] (0, 0) node[circle, draw,pin={\textbackslash draw[thick,->]...}](A) {2};
\draw[thick,->] (A) to [loop below] ();
\end{tikzpicture}\\
\begin{tikzpicture}
\draw[thick] (0, 0) node[circle, draw,pin={(A) edge[loop below, distance=2mm] (A)}](A) {3};
\draw[thick] (A) edge[loop below, distance=2mm] (A);
\end{tikzpicture}&
\begin{tikzpicture}
\draw[thick] (0, 0) node[circle, draw,pin={edge[->,...}](A) {3};
\draw[thick] (A) edge[->,loop below, distance=2mm] (A);
\end{tikzpicture}\\
\end{tabular}

\begin{tikzpicture}%[every loop/.style={}]
\draw (0,0) edge [red,loop above] () to [loop right] ()
to [loop below] () to [loop left] ();
\end{tikzpicture}
\begin{tikzpicture}[every loop/.style={}]
\draw (0,0) edge [loop above] () to [loop right] ()
to [loop below] () to [loop left] ();
\end{tikzpicture}

\begin{tikzpicture}
\node [circle,draw] {a} edge [loop above] node {x} ();
\end{tikzpicture}
\begin{tikzpicture}[every loop/.style={}]
\node [circle,draw] {a} edge [loop above] node {x} ();
\end{tikzpicture}

\begin{tikzpicture}
\draw[thick] (0, 0) node[circle, draw](Z) {};
\draw[thick] (Z) edge[red,distance=10pt,loop below] (Z);
\end{tikzpicture}
\begin{tikzpicture}
\draw[thick] (0, 0) node[circle, draw](Z) {};
\draw[thick] (Z) edge[loop below,distance=10pt] (Z);
\end{tikzpicture}
\end{document}
1
  • Thanks. I've marked your post as an answer. Sep 22, 2020 at 19:37

Your Answer

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

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