Horizontal Trees in Graphviz

GraphvizDot

Graphviz Problem Overview


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).

Graphviz Solutions


Solution 1 - Graphviz

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";
  ...
}

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPeterView Question on Stackoverflow
Solution 1 - GraphvizCapelliCView Answer on Stackoverflow