无箭头的边

无箭头的边

我试图画一条没有箭头的边。当我这样做时:

\begin{tikzpicture}

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

尽管我在 tikz 代码中没有指定“>=”,但我还是得到了一个箭头。我尝试了“edge[-,loop below]”,但仍然得到了箭头。我还尝试了“edge[style={},loop below]”。我最终通过尝试距离移除了箭头:

\begin{tikzpicture}

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

为什么距离会使箭头熄灭?我是不是漏掉了什么?

\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}

答案1

不是一个答案,但从手册(75.4 Loops)推断,它可能是解析逻辑(也许也与的定义交互edge[loop],但这只是猜测)。

初始值为->,和loop below,其他的没有设置值。注意 会edge[distance=10pt,loop below]产生箭头。

环形

平均能量损失

\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}

相关内容