ellson / MOTHBALLED-graphviz

Moved to https://gitlab.com/graphviz/graphviz
Eclipse Public License 1.0
1.3k stars 256 forks source link

[Dot] When exactly do multiple splines occur? #1277

Open chtenb opened 7 years ago

chtenb commented 7 years ago

A spline type can have multiple splines, according to http://www.graphviz.org/doc/info/attrs.html#k:splineType

However, I have not been able to find an answer in the documentation to the following question:

When and why will there be multiple splines?

magneticnorth commented 7 years ago

There may be (and often are) multiple sections, in, say a piecewise cubic Bezier spline that has to route around a number of obstacles, or in orthogonal routes that have multiple horizontal and vertical segments. This is very common.

chtenb commented 7 years ago

I've got a situation in which there are multiple subsplines, but they result in two different edges being drawn, which I don't understand and which don't seem to fall under the above explanations.

[Removed example, see below for reproduction scenario.]

chtenb commented 7 years ago

It's hard to create a small reproduction scenario. When I start to remove nodes, these strange splines also start to dissappear. If I remove all clusters, these splines don't seem to occur either.

chtenb commented 7 years ago

I seem to have found a decently small enough reproduction case.

image

digraph "8285a152-0673-4d53-81f8-1eb06bc9b84f" {
    graph [
        compound=true,
        fontsize=30,
        labelloc=t,
        margin=10,
        newrank=true,
        ranksep=3
    ];
    node [color=black,
        shape=point
    ];
    edge [arrowhead=none,
        color=black,
    ];
    subgraph "rank-213556c6-92a6-4884-8032-ac1ddc2303a3" {
        graph [
            compound=true,
            fontsize=30,
            label="",
            labelloc=t,
            margin=10,
            newrank=true,
            rank=same,
            ranksep=3
        ];
        "logical.20:0D:00:2A:6A:D1:10:E8"   ;
        "logical.20:0D:8C:60:4F:D7:12:50"   ;
        "logical.20:0A:00:2A:6A:D1:10:E8"   ;
        "logical.20:0A:8C:60:4F:D7:12:50"   ;
    }
    subgraph "cluster_20:01:00:2A:6A:D1:10:E9" {
        graph [
            compound=true,
            fontsize=30,
            label="2001002A6AD110E9",
            labelloc=t,
            margin=10,
            newrank=true,
            ranksep=3
        ];
        "logical.20:0D:00:2A:6A:D1:10:E8";
        "logical.20:0A:00:2A:6A:D1:10:E8" [color="red"];
        "logical.20:0D:00:2A:6A:D1:10:E8" -> "logical.20:0A:00:2A:6A:D1:10:E8"  ;
    }
    subgraph "cluster_20:01:8C:60:4F:D7:12:51" {
        graph [
            compound=true,
            fontsize=30,
            label="20018C604FD71251",
            labelloc=t,
            margin=10,
            newrank=true,
            ranksep=3
        ];
        "logical.20:0D:8C:60:4F:D7:12:50";
        "logical.20:0A:8C:60:4F:D7:12:50";
        "logical.20:0D:8C:60:4F:D7:12:50" -> "logical.20:0A:8C:60:4F:D7:12:50"  ;
    }
    "logical.20:0D:00:2A:6A:D1:10:E8" -> "logical.20:0D:8C:60:4F:D7:12:50"  ;
    "logical.20:0D:00:2A:6A:D1:10:E8" -> "logical.20:0A:8C:60:4F:D7:12:50"  ;
    "logical.20:0D:8C:60:4F:D7:12:50" -> "logical.20:0A:00:2A:6A:D1:10:E8"  ;
    "logical.20:0A:00:2A:6A:D1:10:E8" -> "logical.20:0A:8C:60:4F:D7:12:50"  [color="red"];
}
emden commented 7 years ago

This is a duplicate of issue 1223.