This answer describes how to connect GraphViz clusters to nodes and to other clusters.
I want to connect a cluster to itself, so the arrow exits the cluster boundary and re-enters (think of a state machine that has a transition to itself).
Below is an example:
digraph example {
compound=true;
"B" -> "C" [ltail="cluster_s0", lhead="cluster_s1", minlen=2];
"D" -> "C" [ltail="cluster_s1", lhead="cluster_s1", minlen=2];
subgraph cluster_s0 {
"A" -> "B";
}
subgraph cluster_s1 {
"C" -> "D";
}
}
This throws warnings and draws the arrow inside the cluster instead of outside:
Here's a (very rough) sketch of what I want:
Is there a way to make GraphViz draw an arrow from D
to C
that exits and re-enters the cluster boundary like in the above example?