I have the following dot layout:
digraph {
a b c
a -> b b -> c
b -> g1 [dir=back,constraint=false]
b -> g2 [dir=back,constraint=false]
g1 -> g2 [style=invis]
}
I would like g1 and g2 to be closer to each other and vertically centered around b like this:
I tried with a subgraph and cluster for g1 and g2 and with some invisible edges. I never managed to do anything good enough.



The easiest way is to set rankdir=LR to make node alignment vertical instead of horizontal. Then use rank=same to keep a, b, and c aligned.
Giving:
