Placing clusters on the same rank in Graphviz

后端 未结 2 1820
慢半拍i
慢半拍i 2021-02-02 07:00

I would like these two nodes to appear on the same level:

\"enter

digraph          


        
2条回答
  •  我在风中等你
    2021-02-02 08:03

    You may use the newrank graph attribute (added in GraphViz 2.30) to activate the new ranking algorithm which allows defining rank=same for nodes which belong to clusters.

    Add the following line at the top:

    newrank=true;
    

    Add the following line after the cluster definitions:

    { rank=same; router1; router2; }
    

    Here's the resulting graph:

    routers with same rank

提交回复
热议问题