Howto break a flat but sparsely connected graphviz graph into multiple rows?
Graphviz yields a graph of about 4 ranks, but over 9000 nodes wide. However since the graph is sparsely connected we could break it in to rows, for example each 1000 nodes, and thus make it fit on nine rows one page. How can this be done?
Not looking for unflatten, but rather something like line breaks in a text editor (is it clear what I am looking for?).
Edit: PDF with example graph here
Yes I guess you want a mechanism like the one that is implemented in unflatten.
The Graphviz dot layout algorithm is quite deterministic. It will produce the same layout for the same input topology. If the structure of your input graph is "wide and shallow", then this is what your final diagram will look like. dot does not support layout directives like "line break here, please" or "max-width: 1000 nodes".
unflatten (for example) modifies the input graph by adding invisible 'helper' edges. You don't see those edges in the final output. They create a different, intermediate graph. This graph is in deed less wide and less shallow, because the 'helper' edges change the topology. That's why it looks like there were "line breaks" in otherwise long running rows.
You can achieve the same result by placing such invisible edges yourself in the input graph. This way you can could implement your own topology transformer which is smarter than the 2 strategies that unflatten follows.
If you provide some example dot source, or a fix for your broken pdf link, then we could look into these.
Also please explain why you don't want to use unflatten: is it not available to you or don't you like its results?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With