我正在看一篇论文,有一张用 Tkiz 画的图。我想知道我们是否可以控制箭头在哪里分成两部分以及如何在箭头中添加掉头,如下所示:
\begin{tikzpicture}[line width=3pt]
\node (A) at (0, 10) {A};
\node (B) at (1, 1) {B};
\node (C) at (-2, 7.5) {C};
\node (D) at (3, 0) {D};
% arrows
\draw[-> ,>=latex, blue!30!white, line width=7pt, rounded corners=5pt, to path={-| (\tikztotarget)}]
(A) edge (B) (B) edge (C) (C) edge (D);
\end{tikzpicture}
答案1
这里有一些可以帮助您开始使用这些箭头的东西。
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary {positioning, calc, arrows.meta}
\begin{document}
\begin{tikzpicture}[
every node/.style={draw, minimum size=2cm},
node distance = 3cm and 5cm,
> = {Triangle[scale=0.5]}]
\node (A) {A};
\node [above right = of A] (B) {B};
\node [right = of A] (C) {C};
\begin{scope}[line width=5mm, cyan, rounded corners=10pt]
\path ($(B)!0.5!(C)$) -| (A) coordinate [pos=0.2] (aux);
\draw (A) -- ($(A)!0.3!(C)$) |- (aux);
\draw[<->] (B) -| (aux) |- (C);
\end{scope}
\end{tikzpicture}
\end{document}