subgraph cluster ranking in dot

前端 未结 3 1160
南方客
南方客 2020-12-14 21:41

I\'m trying to use graphviz on media wiki as a documentation tool for software.

First, I documented some class relationships which worked well. Everything was ranked

3条回答
  •  没有蜡笔的小新
    2020-12-14 22:33

    My experience shows that constraint=false commonly gives unnecessarily convoluted edges. It seems that weight=0 gives better results:

    digraph d {
        subgraph cluster0 {
            A -> {B1 B2}    
            B2 -> {C1 C2 C3}
            C1 -> D;
        }
        subgraph cluster1 {
            C2 -> dll1_A [minlen = 2];
            dll1_A -> B1 [weight = 0];
            /* B1 -> dll1_A [dir = back]; */
        }
        subgraph cluster2 {
            C3 -> dll2_A;
        }
        dll1_A -> dll2_A;
    }
    

提交回复
热议问题