1

I'm using graphviz to make images from .dot files in ubuntu using this command:

sfdp -x -Goverlap=scale -Tpng file.dot > file.png

However the result looks the images on this post where its circular and compact. Is there a way to make it look hierarchical like this?

Thanks

Community
  • 1
  • 1
omega
  • 40,311
  • 81
  • 251
  • 474

1 Answers1

2

In order to draw directed graphs as hierarchies, you may use [dot][1] to layout your graph instead of sfdp:

dot -Tpng file.dot -o file.png

Your graph should be acyclic. If it is not, you may have to reverse the direction (and add dir=back) of an edge or two in order to get the desired results.

Community
  • 1
  • 1
marapet
  • 54,856
  • 12
  • 170
  • 184