Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 459
Yatin Kumbhare Avatar asked Jan 20 '12 10:01

Yatin Kumbhare


1 Answers

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

like image 114
ryandesign Avatar answered Nov 14 '22 00:11

ryandesign