TransWikia.com

edge without arrow

TeX - LaTeX Asked by user2926204 on December 20, 2020

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}

One Answer

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}

Correct answer by Cicada on December 20, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP