Instead of clusters, this uses rank and the group attributes to align nodes.
- rank=same always (or almost always?) keeps nodes aligned.
- group=xyz usually keeps nodes aligned.
- other changes are just cosmetic.
digraph {
rankdir=LR
color=transparent
node [group="upper"] // try to keep same Y value
Start FA FB FC FD Goal
node [group="lower"] // try to keep same Y value
A B D
{ rank=same // keep same X value
FA->A [style="invis"]
}
{ rank=same // keep same X value
FB->B[style="invis"]
}
{ rank=same // keep same X value
FD->D[style="invis"]
}
Start -> FA -> FB -> FC -> FD -> Goal
A -> B -> FD
}