Dav*_*man 19 graph dot graphviz
我正在尝试使用graphviz对某个流进行建模,我无法弄清楚如何对下面的图进行建模以共享同一个水平中心
digraph exmp {
A -> B -> C -> D
C -> E [constraint=false]
A -> C [style="dotted", constraint=false]
A -> D [style="dotted", constraint=false]
B -> D [constraint=false]
D -> A [style="dashed", constraint=false]
C -> A [style="dashed", constraint=false]
subgraph cluster_hackToSinkIt { E -> F }
{ rank="sink" E F }
}
Run Code Online (Sandbox Code Playgroud)
这导致以下图表:

我的问题是,我怎样才能将E - > F定位在D下,这就是在同一列中?
Mar*_*off 28
至少截至2007年5月,你不能强制"列" 本身,但你可以对边缘施加重量,这应该有助于强制对齐.但实际上,在这种情况下,如果你只是从D到E添加一个不可见的边,你就有了垂直对齐.
digraph exmp {
A -> B -> C -> D
C -> E [constraint=false]
A -> C [style="dotted", constraint=false]
A -> D [style="dotted", constraint=false]
B -> D [constraint=false]
D -> A [style="dashed", constraint=false]
C -> A [style="dashed", constraint=false]
D -> E [style="invis"] // <---- important new line
subgraph cluster_hackToSinkIt { E -> F }
{ rank="sink" E F }
}
Run Code Online (Sandbox Code Playgroud)

我不知道有任何方法可以将边缘强行推向一边或另一边.