![节点之间的箭头问题](https://linux22.com/image/242443/%E8%8A%82%E7%82%B9%E4%B9%8B%E9%97%B4%E7%9A%84%E7%AE%AD%E5%A4%B4%E9%97%AE%E9%A2%98.png)
我需要在两个节点之间绘制箭头,但不是从节点中心开始绘制。当我使用位置修饰符时,新的箭头末端会出现在起点。
这是一个最小的例子:
\begin{tikzpicture}
\matrix [column sep=1cm,row sep=3cm]{
\node [] (node1) {Node 1}; \\
\node [] (node2) {Node 2}; \\
};
\begin{scope}[every path/.style={draw, thick,-latex',shorten >= 2pt}]
\path[bend right] (node1) edge (node2);
\path[bend right] (node1.south) edge (node2);
\path[bend right] (node1.south east) edge (node2);
\end{scope}
\end{tikzpicture}
这就是我得到的:
请问有什么建议吗?
答案1
设置every edge/.style
而不是every path/.style
:
\begin{scope}[every edge/.style={draw, thick,-latex',shorten >= 2pt}]
通过对代码进行修改,我得到了期望的结果: