add / remove nodes without changing existing nodes disposition

I am trying to use graphviz to display a hierarchical structure in a python program.
The window shows the graph, and by clicking on the nodes I'm able to navigate the structure.
Normally only nodes at depth 1 are shown, and I'd like to expand/contract the view by clicking on individual nodes, file-manager style.
What I found is that it works, but every time the pre-existing nodes change position, accomodating the new ones.
There is a way to keep the old nodes positions fixed?

For a better explanation, I asked here too:
where you can find some images detailing my attempts

Re: add/remove nodes without changing existing nodes disposition

If you know the maximal graph, you can layout once and then elide nodes and edges in a relayout using "neato -n", or from the scripting interfaces you can re-render with modified colors so that the elided nodes and edges are invisible.

Doesn't help unless you have information about all possible nodes ahead of time.

Recent comments