Way to not merge/combine nodes?

I'm interested in drawing a graph where a new copy of a node is made each time it's used.

To put it another way, every time a node is used, I'd like to have a new circle in the graph so the full tree structure of the graph appears, rather than a more standard state diagram.

To put it a third way, is there some Graphviz option that makes a graph like:

digraph A {
node1->node2
node3->node2
}

End up looking like the following graph?

digraph B {
node2a [label="node2"]
node2b [label="node2"]

node1->node2a
node3->node2b
}

Note how in the first example, there's a single node2, with a line from both node1 and node3 going to it. I'd like two node2s to appear, with node1 going to the first, and node3 going to the second, but the same label on the node, like in the second graph.

Is there a setting to do this automatically? Or do I have to explicitly make a copy of the node and relabel it each time? Thanks for any suggestions or input!

The same here

I'm also interested in such functionality!
Any suggestions, please?

Recent comments