Tikz:带图形的流程图

Tikz:带图形的流程图

我正在试验全自动放置流程图。没有任何坐标和块名称。

具有多个输出的块的问题。

我使用了以下技巧:

a -!- { [nodes={xshift=-10mm}]
  (a.west) -> /,
  (a.east) -> /
}

问题是:

  1. 这是一个好的解决方案吗?或者是否存在更标准的解决方案?

  2. 如果没有,我该如何去掉决策块的名称?是否有一个命令带有父块的名称?

完整示例:

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{graphs}
\usetikzlibrary{graphs.standard, arrows, shapes.geometric}

\begin{document}
\tikz [
>=stealth'
, ortho/.style = {to path={-| (\tikztotarget)}}
, back/.style = {to path={|- (\tikztotarget)}}
, connection/.style={draw, circle, radius=5pt}
, operation/.style={draw, rectangle}
, decision/.style={draw, diamond}
]
\graph [
grow down sep
, branch right=20mm,
simple
] {
  start [draw, rectangle, rounded corners]
  -> /test [operation]
  -> a[decision]
  -!- { [nodes={xshift=-10mm}]
    (a.west) ->[ortho] /test [operation] -> /test [operation],
    (a.east) ->[ortho] d/test [decision]
    -!- { [nodes={xshift=-10mm}]
      (d.west) ->[ortho]  /test [operation],
      (d.east) ->[ortho] f/test [decision]
      -!- { [nodes={xshift=-10mm}]
        (f.west) ->[ortho] /test [operation],
        (f.east) ->[ortho] /test [operation] -> /test [operation]
      }
    }
  }
  -- [back] /[coordinate]
  -> /test [operation]
  -> end [draw, rectangle, rounded corners]
};
\end{document}

结果:

在此处输入图片描述

相关内容