答案1
作为起点:
\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{arrows.meta, positioning, quotes}
\begin{document}
\begin{tikzpicture}[
node distance = 12mm and 12mm,
box/.style = {draw, rounded corners,
minimum width=22mm, minimum height=5mm, align=center},
> = {Straight Barb[angle=60:2pt 3]},
bend angle = 15,
auto = right,
]
\node (n1) [box] {text\\ text text text 1};
\node (n2) [box, below right=of n1] {text\\ text text 2};
\node (n3) [box, above right=of n2] {text\\ text text 3};
%
\draw[dotted,->] (n1) to ["label 1", swap] (n3);
\draw[dashed,->] (n1) to [bend right, "label 2"] (n2);
\draw[->] (n2) to [bend right, "label 3"] (n1);
\draw[->] (n2) to [bend right, "label 5"] (n3);
\draw[dotted,->] (n3) to [bend right, "label 4"] (n2);
\end{tikzpicture}
\end {document}
这里有很多类似的问题和答案。你应该先搜索类似的问题,然后试着根据你的需要做出选择。也有助于阅读tikz 和 pgf 手册,开始教程……
- 库
arrows.meta
用于绘制箭头 - 库
positioning
用于定位节点 - 该库
quotes
用于标记箭头。其语法是["<label text>"]
。选项swap
将标签移动到箭头的另一侧 - 选项
bend right
用于弯曲线条(向右侧) - 其他的应该用上面的代码就可以理解了