我希望有一个图表,其布局如下:
但是当我写下这样的代码时:
digraph g {
a->b->c;
{rank=same;b,d,e,f,g,h}
d->g [weight = 1];
d->f [weight = 10];
}
就是这样:
点指南甚至建议:
Edge weights also play a role when nodes are constrained to the same rank.
Edges with non-zero weight between these nodes are aimed across the rank
in the samedirection (left-to-right, or top-to-bottom in a rotated drawing) as far
as possible. This fact may be exploited to adjust node ordering by placing
invisible edges (style="invis") where needed.
我徘徊为什么它不起作用?
答案 0 :(得分:1)
在图表中添加以下行:
f->g[style=invis];