假设我在特定坐标处创建一个节点,并希望其内容显示在距离其坐标 2 厘米处。最简单的方法是什么?
答案1
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\tikz[label distance=2mm]%<---------------------
\node[
circle,
fill=gray!45,
label=above:12,
label=right:3,
label=below:6,
label=left:9
]
{clock};
\end{tikzpicture}
\begin{tikzpicture}
\tikz[label distance=2mm]%<---------------------
\node[
circle,
fill=gray!45,
label={[label distance=2cm]above:12},
label=right:3,
label=below:6,
label=left:9
]
{clock};
\end{tikzpicture}
\end{document}
编辑
句法
label={[label distance=2cm]angle:label text}]
平均能量损失
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[left] at (1.3206,7.8665) {original+};
\node[left, label={[label distance=2cm]0:displaced+}] at (1.3206,7.8665) {};
\end{tikzpicture}
\end{document}