My goal is to create an edge between clusters but align them so that the edge started in the middle of the cluster A and connected to the middle of the cluster B.
How can I:
make the edge looks like an edge, not like a triangle?
how to remove empty space in place of invisible nodes?
how to align clusters in the center to each other?
maybe you know better way to make edges between clusters without using invisible nodes? I create them only for the edge.
Invisible nodes do occupy some space, but you can reduce that space by setting shape=point (or plain) (Node Shapes | Graphviz) and reducing nodesep (nodesep | Graphviz).
aligning clusters is a challenge. In recent versions of Graphviz (last 6 months?), you can use packmode (the array option) to force node order and cluster positioning (packMode | Graphviz)
fdp (fdp | Graphviz) allows cluster-cluster edges, no invisible nodes needed. (I can’t find documentation about this). But fdp does node layout entirely differently
If you want a gap-less result, I have a program that will produce it. All automated, but you need to make some odd changes to the input (move all cluster-cluster edges to a second graph) and then run a series of programs. Let me know if this sounds fun. See “gapless”, below.
This gets fairly close. Note it only uses one invisible node, to “fix” the problem of even number of nodes in one cluster.