我正在寻找能够生成以下类型的图表的东西:
有什么想法吗?
附录:我可能没有说清楚。我正在寻找一个能够以最少的努力生成方框图和箭头图(如上图)的软件包。当然,我可以通过一些努力生成“精确”的上述图表,但这不是重点,抱歉 :-)
答案1
虽然没有要求,但这是一个简短的例子»pgf/tikZ«。
\documentclass[11pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{fit,positioning}
\usepackage{mathtools}
\DeclareMathOperator{\arr}{arr}
\begin{document}
\begin{tikzpicture}[
>=stealth,
thick,
border/.style={
draw=orange,
rounded corners=2pt
}
]
\coordinate (o) at (0,0);
\node[border,minimum width=3em] (f) at (2,0.5) {$f$\strut};
\node[border,rounded corners=2pt,minimum width=3em] (g) at (2,-0.5) {$g$\strut};
\node[draw,circle,minimum size=2em] (plus) at (4.5,0) {$+$};
\coordinate[above right=0.5 and 0.5 of o] (c1);
\coordinate[right=1 of f] (c2);
\coordinate[below right=0.5 and 0.5 of o] (c3);
\coordinate[right=1 of g] (c4);
\node (text) at (2.5,1.5) {$f\&\&\&g >\!\!>\!\!> \arr(\lambda(z,y)\to y+z)$};
\node[border,fit=(o) (f) (g)]{};
\node[border,minimum height=57.4pt,fit=(c2) (c4) (plus)]{};
\draw (o) -- +(-1,0) node[above,midway] (x) {$x$};
\draw[->] (o) -- (c1) -- (f);
\draw[->] (f) -- node[above,midway] (y) {$y$} (c2) -- (plus);
\draw[->] (o) -- (c3) -- (g);
\draw[->] (g) -- node[above,midway] (z) {$z$} (c4) -- (plus);
\draw[->] (plus) -- +(1.5,0) node[above,midway] (nil) {~~};
\node[draw=orange,rounded corners=2pt,minimum height=92pt,fit=(x) (g) (nil) (text)]{};
\end{tikzpicture}
\end{document}
也许可以在一个地方或另一个地方进行改进(即通过层次)。