Can I use dot to layout in a given coordinate range?

Hello,
this is my first post.

I would like to use dot to extend a given layout with new additions (nodes and edges) while preserving the given layout. The result would be read by a script for further processing.

So I thought to call dot for each connected graph consisting of new nodes and edges, and then integrate the result with the original layout.
For that purpose I would like to tell dot the coordinate range it should use for its layout, so that combining both parts will be easier. But I don’t know how that could be done.

Is this use case feasible?

Thanks for any hints and tips and of course a merry xmas to all!

Short answer - no. Dot ignores pre-positioning of nodes and edges(see pos | Graphviz)

Long answer - maybe. Here are some possibilities.

  • While dot does not accept node & edge positioning as input, gvpack (https://graphviz.org/pdf/gvpack.1.pdf) does. Run dot myFileX.gv > myFileX.dot on each set of nodes and edges and then use gvpack to stitch them together.
  • dot does have the ability to display subsets (layers - see layers | Graphviz) of a larger graph (FAQ | Graphviz). This should produce the “best” overall graph, but the subsets might not be positioned to your liking. (I really like this feature)
  • If you are open to using other layout engines, fdp and neato do accept pre-positioning of nodes and edges (see pin | Graphviz)