我有以下点布局。
digraph {
subgraph {
rank=same;
node [shape=plain] work
node [shape=rectangle,group=work] w2
}
subgraph {
rank=same;
node [shape=plain] main
node [shape=rectangle,group=main] m3
}
node [shape=rectangle,group=work] w1
node [shape=rectangle,group=main] m1 m2
edge [arrowhead=open] m2 -> m1 m3 -> m2 w1 -> m1 w2 -> w1 m3 -> w2
edge [style=dashed] main -> m3 work -> w2
}
我希望图表的左侧部分(“work”标签以及“w1”和“w2”节点)位于图表的右侧部分。我想要这样的东西:
我尝试重新排序节点和子图,但我所做的任何事情都没有使图更接近我想要的。
分为两部分:
digraph {
subgraph {
rank=same;
node [shape=plain] work
node [shape=rectangle,group=work] w2
}
subgraph {
rank=same;
node [shape=plain] main
node [shape=rectangle,group=main] m3
}
node [shape=rectangle,group=work] w1
node [shape=rectangle,group=main] m1 m2
edge [arrowhead=open arrowtail=open]
m2 -> m1 m3 -> m2 w1 -> m1 w2 -> w1 m3 -> w2
edge [style=dashed] main -> m3
w2 -> work [dir=back] // reversed direction of arrowhead
{rank=same m2 w1} // next two reverse the order of the two columns
m2 -> w1 [style=invis] //
}