MOTHBALLED-graphviz
MOTHBALLED-graphviz copied to clipboard
Two edges are rendered though the input contains only one
For the following graph the output is incorrect in both 2.38 and 2.40:
subgraph cluster_0 {
"Naming"
"lily"
}
subgraph cluster_1 {
"daughter"
"speaker"
}
"daughter" -> "speaker" [constraint="false"]
"Naming" -> "daughter" [constraint="false" ]
"Naming" -> "lily" [constraint="false" ]
}
Output:
There are two edges from "Naming" to "daughter" in the output. while there is only one in the input. In SVG output there are 2 paths for a single edge:
<g xmlns="http://www.w3.org/2000/svg" id="edge2" class="edge" style="cursor: pointer;">
<title>Naming->daughter</title>
<path fill="none" stroke="black" d="M146.435,-50.0898C157.188,-58.3894 171.465,-67.6626 186,-72 222.2,-82.8027 234.888,-83.0955 271,-72 281.554,-68.7573 291.905,-62.7752 300.78,-56.5016"/>
<polygon fill="black" stroke="black" points="302.905,-59.2833 308.796,-50.4774 298.699,-53.6875 302.905,-59.2833"/>
<path fill="none" stroke="black" d="M143.257,-50.7887C155.2,-62.6037 172.935,-77.4358 192,-84 222.677,-94.5625 234.406,-94.7993 265,-84 279.9,-78.7407 293.851,-68.2149 304.731,-58.1719"/>
<polygon fill="black" stroke="black" points="307.351,-60.5067 312.081,-51.0265 302.471,-55.4876 307.351,-60.5067"/>
</g>
This bug exists in 2.38. It appears to be a really touchy corner case; If you modify any topological aspect, the bug goes away. It involves the temporary flipping of edge directions for flat edges where the naming-daughter edge is stored as an out edge and an other edge.
Here is a minimal example:
digraph {
newrank=true
subgraph { rank=same A B C }
subgraph cluster1 {
A -> C
}
subgraph cluster2 {
B
}
C -> B ;
}