'GraphViz: Compress automatically generated graph

I am trying to visualize two columns of an an Excel file: Column A contains categories, while Column B contains individual entries. The dot file is generated by Excel using the following formula:

=IFERROR(CONCATENATE("subgraph cluster_",A2,"{""",B2,"""","; label =""",A2,"""}"),"")

Afterwards the "unflatten" utility is used to distribute the nodes more evenly, and finally the "dot" is used to generate the graph

unflatten.exe -f -l 4 -c 6 -o FLATTENED.dot INPUTFILE.dot
dot -Tpng FLATTENED.dot > FLATTENED.png

The following graph is generated

I would like to make the graph more compact, and align the categories to the upper egde of the page, what commands should I look into to improve the resulting output?

I've attached the dot file



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source