It looks like you have it figured out.
It might be a little more subtle as to what is happening. Check these
to SO threads on using the ! modifier to position attribute and the
-n2 option to neato.
https://stackoverflow.com/questions/5343899/how-to-force-node-position-x-and-y-in-graphviz
https://stackoverflow.com/questions/16775844/force-graphviz-to-preserve-node-positions
e.g. 'man neato'
-n[1|2] (no‐op) If set, neato assumes nodes have already been posi‐
tioned and all nodes have a pos attribute giving the positions. It
then performs an optional adjustment to remove node‐node overlap, de‐
pending on the value of the overlap attribute, computes the edge lay‐
outs, depending on the value of the splines attribute, and emits the
graph in the appropriate format. If num is supplied, the following ac‐
tions occur:
num = 1
Equivalent to -n.
num > 1
Use node positions as specified, with no adjustment to remove node‐node
overlaps, and use any edge layouts already specified by the pos attri‐
bute. neato computes an edge layout for any edge that does not have a
pos attribute. As usual, edge layout is guided by the splines attri‐
bute.
Note that you always do need to run through some layout algorithm
since you have to route edges in addition to nodes.
Aric
On Fri, Jan 22, 2021 at 12:42 PM Stephen Davies
> To view this discussion on the web visit
https://groups.google.com/d/msgid/networkx-discuss/0d9f9ee4-b4fc-4f5c-a49b-38c43615be35n%40googlegroups.com.