I would like these two nodes to appear on the same level:
digraph G {
subgraph cluster1 {
label="Local Datacenter";
router1;
host1;
}
subgraph cluster2 {
label="Remote Datacenter";
router2;
host2;
}
router1 -> router2;
router2 -> host2;
router1 -> host1;
}
I have tried using rank=same
and rank=min
, but they aren't giving me what I need.
Interestingly, if I set rankdir=LR
and comment out the two router-to-host edges, it gives me exactly the look I want - but I would like to leave the edges intact.
question from:
https://stackoverflow.com/questions/6824431/placing-clusters-on-the-same-rank-in-graphviz 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…