我想绘制一个像附图那样的图表。
答案1
minimum height
这是通过 tikz 的矩阵节点实现的另一种方法,其中可以通过盒子样式中的和minimum width
和调整盒子,并且可以通过和text width
确定节点分离。column sep
row sep
代码
\documentclass[]{article}
\usepackage[margin=1cm]{geometry}
\usepackage{tikz}
\usetikzlibrary{matrix,shapes,arrows,positioning}
\begin{document}
\begin{tikzpicture}[boxes/.style={draw, rectangle,%
thick,minimum height=1cm, rounded corners,
minimum width=1cm, orange, text=black,
text width=25mm, align=center}]
\matrix (mat) [matrix of nodes, nodes=boxes, column sep=2cm, row sep=1cm]
{
& & Evans \\
Harry & Petter & \\
& & Robert \\
};
\draw [very thick, blue, ->](mat-2-1)--(mat-2-2);
\draw [very thick, blue, ->](mat-2-2.east)--(mat-1-3.west);
\draw [very thick, blue, ->](mat-2-2.east)--(mat-3-3.west);
\end{tikzpicture}
\end{document}