Вопрос

I want to make edges overlap in graphviz. But graphviz seems to re-arrange the leaf nodes to avoid overlapping. Can I force graphviz to stop re-arranging the nodes ?

Produced:

Produced

Desired:

Desired

I am using pygraphviz to create the tree.

Это было полезно?

Решение

The following approach using additional invisible edges works perfectly for this graph:

digraph g{
  Act -> Bore;
  Act -> Cat;
  Bore -> Dog;
  Bore -> Egg [style=invis];
  Bore -> Face;
  Cat -> Egg;
  Cat -> Face [style=invis];
  Cat -> Goat;
}

graphviz output

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top