Graphviz Issue Tracker - graphviz
View Issue Details
0002588graphvizOtherpublic2016-01-18 03:022016-02-09 14:16
0002588: Mulitple duplicate node bug
I have programmatically generated the attached large .dot file.

I compile it under Linux with

dot -Tps -o

However, the last declared node gets duplicated multiple times in the resulting graph (white circles in the linked .ps image, with label "res_582").
( [^])

I have tried dot, sfdp, fdp, twopi.

I suspect a bug in the dot compiler, but a second opinion wouldn't hurt.

Thanks in advance!

P.S. I removed all the individual node descriptions regarding label and then merged node declarations into the resulting 5 different node type groups (regarding shape and fillcolor). This resolved the issue of duplicate nodes appearing, but I lose the individual label functionality, which was useful to me.
In an Ubuntu terminal:

dot -Tps -o
No tags attached.
dot (26,357) 2016-01-18 03:02
dot (18,248) 2016-02-09 14:01
Issue History
2016-01-18 03:02GeoracerNew Issue
2016-01-18 03:02GeoracerFile Added:
2016-01-18 08:41northNote Added: 0001015
2016-01-18 09:16GeoracerNote Added: 0001016
2016-02-09 13:59ellsonNote Added: 0001028
2016-02-09 14:01ellsonFile Added:
2016-02-09 14:16GeoracerNote Added: 0001029

2016-01-18 08:41   
The sample graph has a long series of statements of the form:

    node [shape = box, fillcolor = cyan, style = filled, label="keq4
    34"]; keq4;
    node [shape = box, fillcolor = cyan, style = filled, label="keq5
    39"]; keq5;
ending in
    node [shape = circle, fillcolor = white, style = filled, label="res_582
    753"]; res_582;

Each statement sets the defaults for all new nodes, but only makes one node,
except the last one sets the defaults for all other nodes created afterward.
I think the intent was just to make one node and set its attributes, like this
    keq4 [shape = box, fillcolor = cyan, style = filled, label="keq4
    keq5 [shape = box, fillcolor = cyan, style = filled, label="keq5
    res_582 [shape = circle, fillcolor = white, style = filled, label="res_582

I don't have time to investigate further but this is almost certainly what went wrong,
not a bug in the graph parser.
2016-01-18 09:16   
Thank you for your time, north.
Indeed, I may not have used the best coding. I have switched to your proposed notation and the problem does not occur anymore.

I don't understand the cause of the problem, i.e. if I used bad syntax. However, from my point of view, this ticket is solved.

If anyone else sees something more in this and wishes to investigate further, I'm willing to provide more info.
2016-02-09 13:59   
Sounds like you have this solved. Just wanted to add that you can use "node" in "subgraphs" to set common attributes, and still use individual attributes. I'll attach a more concise version of your graph using this technique,
2016-02-09 14:16   
Thanks for the hint!