Your graph is a directed graph layed out with dot from left to right, and the first rank contains many nodes which results in a very high image.
The main tool to break up graphs with this problem is unflatten
:
unflatten is a preprocessor to dot that is used to improve the aspect
ratio of graphs having many leaves or disconnected nodes. The usual
layout for such a graph is generally very wide or tall. unflatten
inserts invisible edges or adjusts the minlen on edges to improve
layout compaction.
You may combine this with other tools and techniques to get the result you want:
- Use the
unflatten
utility - please see this answer for a detailed example using unflatten.
- Use invisible edges to introduce new ranks (basically what unflatten does automatically, but with human inspiration... example also here)
- If you need the output to be of this exact size, be sure to understand graphviz's various attributes which have an impact on it, such as
size
, margin
, ratio
... (see also this and yet another answer providing details)
- Finally, you could simply use a different layout (
neato
for example)