Graphviz: Stacking fields vertically inside a subgraph

I'm trying to put a group of fields vertically (there are 8 specific fields in Graphviz, so I would prefer to have 4x4). I have a cluster of subgraphs containing 8 fields that, by default, line up side by side horizontally, which makes the connections extremely messy. I feel that it would be much clearer if the subfields were vertical.

+6
source share
1 answer

A common technique for layout nodes is to use invisible edges .

In the following example, nodes n1-n8 are located vertically inside the cluster, but the edges are not displayed.

digraph g{ subgraph cluster0 { edge[style=invis]; n1->n2->n3->n4->n5->n6->n7->n8; } // some visible edges from nodes outside of the cluster to nodes within the cluster a -> b; a -> {n2;n7;n8}; b -> {n4;n6;n7;}; } 
+4
source

Source: https://habr.com/ru/post/894410/


All Articles