How do I place nodes on the same level in DOT?

后端 未结 3 1084
攒了一身酷
攒了一身酷 2021-01-31 15:09

I want to render several trees simultaneously and place all root nodes and all leaf nodes on the same level.

Here\'s an example of what I\'m trying to do. Root nodes A a

3条回答
  •  野的像风
    2021-01-31 16:03

    Here's a simple example inspired by @William John Holden's comment -

    graph {
      rankdir=LR;
      a -- b -- c;
      d -- e -- f;
      b -- d; {rank = same; b; d;};
    }
    

提交回复
热议问题