How can I generate rectangle style edges instead of curves in GraphViz?

14.6k views Asked by At

I have generated Graphviz images with the dot language using the Pydot Python library.

Generated Graphviz Graph

But the edges are getting draw in curves, and I need this kind of output:

Expected Graphviz

Please provide a solution using Graphviz.

1

There are 1 answers

2
ryandesign On

This feature is called "orthogonal edge routing" and is available in Graphviz versions from September 28, 2010 and newer. Use "graph [splines=ortho]"; see the Graphviz documentation.

digraph Orthogonal {
  graph [label="Orthogonal edges", splines=ortho, nodesep=0.8]
  node [shape=box]
  a->{b c}
  b->{d e}
  c->{f g}
}

enter image description here