Graphviz:对齐森林中的树根

Graphviz: Align tree roots in a forest

我在DOT中定义了一片森林(一组树)。 我正在使用 dot 进行布局。

现在的问题是:树有不同的深度。我想在同一水平上对齐根节点,但默认情况下,节点与叶子对齐。

我认为您在问题

中混淆了实际预期
digraph {

 // create a forest hanging from the ceiling
 node[shape=box]
 edge[dir=back]
 a->b->c
 d->e->f->g
 h->i

 // ground the forest
 ground_node[style=invis]
 subgraph {
  c;g;i
 } -> ground_node [style=invis]

}