如何用 TikZ 制作弯曲线/箭头?

如何用 TikZ 制作弯曲线/箭头?

我最近一直在测试 TikZ,但我对它还不太熟悉。我想要做的是创建一条线来表示参数属于绘图的一部分。例如“我指向的这个表面的温度为 T”。我有时看到的做法是使用一条中间有一个小 S 形弯曲的线或箭头。我认为这是个好主意,因为很容易看出这条线与你正在绘制的物体没有任何关系。不幸的是,我在寻找一张解释我的想法的图片时遇到了一些问题。箭头指定P θ尽管图片并不完全相同,但这是我能找到的最好的图片。

在 TikZ 中是否有任何简单的方法可以完成这样的事情?我不知道它会叫什么...

答案1

在 TikZ 中有多种方法可以实现这一点。以下是三个示例:

\begin{tikzpicture}
  \node[anchor=east] at (0,0) (text) {This is some text.};
  \node[anchor=west] at (3,1) (description) {Here is the description.};
  \draw (description) edge[out=180,in=0,->] (text);
\end{tikzpicture}

\begin{tikzpicture}
  \node[anchor=east] at (0,0) (text) {This is some text.};
  \node[anchor=west] at (3,1) (description) {Here is the description.};
  \draw[->] (description) -| (text);
\end{tikzpicture}

\begin{tikzpicture}
  \node[anchor=east] at (0,0) (text) {This is some text.};
  \node[anchor=west] at (3,1) (description) {Here is the description.};
  \draw[->] (description) .. controls ([xshift=-4cm] description) and ([xshift=4cm] text) .. (text);
\end{tikzpicture}

产生

三张 TikZ 图片的截图。

相关内容