I've been struggling with this for a while and cannot seem to find a straight answer. I'm working with compound subgraphs in graphviz and cannot seem to find the right combination of settings to force two subgraphs to align with each other.
Enclosed is a simple example to show the problem...
digraph g {
compound=true;
subgraph cluster_top {
graph [color=black, label="Top", rank=min];
nodeA; nodeB; nodeC
cluster_top_DUMMY [shape=point style=invis]
}
subgraph cluster_service {
graph [color=black, label="Bottom", rank=min];
node1; node2; node3; node4; node5; extra_long_node
cluster_bottom_DUMMY [shape=point style=invis]
}
cluster_top_DUMMY -> cluster_bottom_DUMMY [ style=invis ]
}
This generates output with the Bottom subgraph significantly wider than the Top subgraph.
What I really want is for to ensure that both Top and Bottom are always exactly the same width. In addition, if there are too many nodes to fit into the available width, it would generate additional rows of nodes.