Node and edges priority when layouting

[These ideas are not well tested. Most are not tested at all]

  1. use dot on MainSet & pin (pin | Graphviz) the node locations:
  • Create a graph that only contains your “MainSet”. This will probably work best if everything is inside one cluster.
  • run dot -Tdot mainset.gv | gvpr -c 'N{$.pin="true"}' > intermediate.dot Nodes now pinned.
  • add the nodes and edges of the SubSet to intermediate.dot (at the end of the file, but inside the closing brace.
  • run fdp -s -Tpng intermediate.dot >all.png (fdp will honor clusters) (note the -s option)
  1. the weight and group attributes “kind of” do this. (“kind of”)
  2. Yes, you can create edges that ignore node placement. Splines are quite difficult, straight edges without arrowheads are easy, and straight edges with arrowheads are in-between. (see Fun with edges! to start) (more info available if needed)
  3. gvpack (https://graphviz.org/pdf/gvpack.1.pdf) might also come in handy, gluing together multiple graphs.
1 Like