dot draws graphs in four main phases:
- Breaks any cycles which occur in the input graph by reversing the internal direction of certain cyclic edges.
- Assigns nodes to discrete ranks or levels. In a top-to-bottom drawing, ranks determine Y coordinates. Edges that span more than one rank are broken into chains of “virtual” nodes and unit-length edges.
- Orders nodes within ranks to avoid crossings.
- [...]