Horizontal Trees in Graphviz

Peter picture Peter · Feb 14, 2013 · Viewed 21.3k times · Source

I've made a tree in the dot language, similar to the one here.

Is there any way I could get the tree to expand to the right, instead of downwards (so the root node is on the left and children go along to the right).

Answer

CapelliC picture CapelliC · Feb 14, 2013

it's very easy, as long as you stick to basic layout: place rankdir="LR" near top definition. Something like

digraph unix {
  size="6,6";
  rankdir="LR";
  ...
}