orderGraphviz-固定子图 [英] orderGraphviz - fixed subgraphs
本文介绍了orderGraphviz-固定子图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我喜欢这样创建3列图形:
I like to create a 3 column graph like this:
代码:
digraph g {
rankdir="LR";
node[shape = circle, fontsize=14];
fontsize=18;
labeljust="l";
{ rank=same;
}
edge[style=invis, fontsize=12];
subgraph clusterA {
a->b;
label="A";
}
subgraph clusterC {
e->f->g;
label="C";
}
subgraph clusterB {
c->d;
label="B";
}
}
我想用子图A,C,B的顺序创建一个图.如何在不保留A–C–B的顺序的情况下向该图添加关系(例如c-> f;和b-> g;)?
I want to create a graph with the subgraphs A,C,B ordering. How can I add relations to this graph (ex. c->f; and b->g;) without the remaining the order of A--C--B?
推荐答案
您可以尝试使用 constraint=false
添加不应该影响布局的边.在最后一个群集之后,插入以下内容:
You may try adding the edges which are not supposed to influence the layout with constraint=false
. After the last cluster, insert something like:
edge[constraint=false, style=solid];
c->f;
b->g;
如果集群仍然重新排序,则可以添加不可见的边缘(确保constraint=true
)以强制布局:
If the clusters get reordered anyway, you may add invisible edges (make sure that constraint=true
) to enforce the layout:
c -> e [constraint=true, style=invis];
e -> a [constraint=true, style=invis];
这篇关于orderGraphviz-固定子图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文