答案1
\documentclass{standalone}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
for tree={
draw,
semithick,
rounded corners,
text width=6em,
text badly centered,
minimum height=4ex,
edge={
draw=blue},
anchor= north,
grow=south,
forked edge,
s sep=4mm,
l sep=12mm,
fork sep=6mm,
}
[sample number 1[pure fruit][non pure fruit[water abc][sugar \\contaminated]]]
\end{forest}
\end{document}
编辑相同尺寸的盒子
\documentclass{standalone}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
for tree={
draw,
semithick,
rounded corners,
text width=6em,
text badly centered,
minimum height=6ex,
edge={draw=blue},
anchor= north,
grow=south,
forked edge,
s sep=4mm,
l sep=5mm,
fork sep=3mm,
inner sep=1pt
}
[sample number 1[pure fruit][non pure fruit[water abc][sugar \\contaminated]]]
\end{forest}
\end{document}