Pergunta

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.

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top