Question

I've been looking over the GraphViz docs and stackoverflow for the last hour, but can't find a solution to this problem. I have several clusters in my dot file, and I need certain nodes to stay within specific clusters. Some of the nodes have relationships with nodes in other clusters. It seems every time I save the file, a few of the nodes jump between different clusters. Is there a way to define a node as always being part of a specific cluster?

Was it helpful?

Solution

I figured out how to avoid this issue.

I was defining both the nodes and the edges within the subgraphs, so I think it was getting confused when edges included nodes that should not be contained within the subgraph.

Instead, I just only define the nodes (all the nodes) within the subgraphs, and define the edges afterwards all together at the end of the file. Works like a champ :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top