Intercluster Lables support


We have tried about everything to make these kind of graphs look good (generation is automated).
Any idea what should we do ? Our best result is attacked, but lables are one on top of the other.
The edge should start and end where they do in the picture.

digraph G {
//edge [splines=ortho]
subgraph cluster_0 {
"0start" [shape=point];
subgraph cluster_1 {
2 [URL="/Wandering/Turn/Turn", label="TASK[Turn]"];

subgraph cluster_3 {
4 [URL="/Wandering/Drive/Drive", label="TASK[Drive]"];

5 [URL="/Wandering/Pause", label="Pause"];

"0start" -> 2 [fontsize=8, lhead=cluster_1,nodesep=1];
2 -> 4 [fontsize=8, lhead=cluster_3, ltail=cluster_1, label="/TIMEOUT",nodesep=1];
2 -> 5 [ltail=cluster_1, fontsize=8, label="/PAUSE",nodesep=1];
4 -> 2 [fontsize=8, lhead=cluster_1, ltail=cluster_3, label="/STUCK",nodesep=1];
4 -> 2 [fontsize=8, lhead=cluster_1, ltail=cluster_3, label="/TIMEOUT",nodesep=1];
4 -> 5 [ltail=cluster_3, fontsize=8, label="/PAUSE",nodesep=1];
5 -> 2 [lhead=cluster_1, fontsize=8, label="/RESUME",nodesep=1];

Wandering.png22.16 KB

First, I don't know what

First, I don't know what version of dot you are using, but the overlap of the edge labels between the Drive and Turn clusters should not be happening at all in dot. I am not seeing them in 2.35. Indeed, there should be node label overlap at all. I also am getting  the overlap of the labels on the edges 2->5 and 5->2. This is a bug.

As a workaround, update to a new version, which will handle everything but the bug I mentioned. For this, change the labels on 2->5 and 5->2 to xlabels. This will prevent the label overlap, but you'll notice that the edges themselves overlap, which is part of the bug.

Recent comments