Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002568graphvizNeatopublic2015-09-03 08:002015-11-18 10:25
Assigned Toellson 
PlatformMacOSMac OS XOS VersionYosemite
Summary0002568: Problem with multigraphs in latest version (graphviz-2.39.20150720.1238), multiple edges always overlap
DescriptionI use graphviz for a long time. Recently, I made an update to the development snapshot (graphviz-2.39.20150720.1238) to use newer features but from there on, multiple edges between nodes are displayed as a single edge (see test_graphviz-2.39.20150720.1238.pdf).
For graphviz-2.36 (and before) the edges were well separated (see test_graphviz-2.36.0.pdf).

I tried to adjust the "concentrate" attribute (which sounds to me to have a similar effect).
Also changing the "sep" and "esep" attributed didn't work.
I also built from source without any difference to the provided pkg.

Any idea what is going wrong? Any other attribute which has a different default value now?

Steps To ReproduceThe attached test graphs were produced for the very simple graph:

digraph G {
a -> b
a -> b

and neato

neato -Tps2

The same effect happens when using dot or fdp as engine.
TagsNo tags attached.
FIX-COMMENTrepaired test for multiedges in id comparison
Attached Fileszip file icon (Attachment missing)
zip file icon (Attachment missing)
pdf file icon test.pdf (Attachment missing)
png file icon out2.png (Attachment missing)
png file icon out1.png (Attachment missing)
png file icon out.png (Attachment missing)
png file icon out4.png (Attachment missing)

- Relationships

-  Notes
User avatar (0000967)
ellson (administrator)
2015-09-03 11:14

Fixed. Sorry about that.
User avatar (0000968)
pluto (reporter)
2015-09-03 11:44

Wow, thanx for the quick help! Now, it works again!
Can you tell me why multiple edges still overlap when 'splines=true'?

digraph G {
a -> b
a -> b

My problem is that I have a graph where either edges between different nodes overlap ('splines=false', see attached or edges between same nodes overlap ('splines=true', see attached

Perfect would be non-overlapping multiple edges when 'splines=true'.
Or is there another way.
Sorry, for bothering you again.
User avatar (0000969)
north (administrator)
2015-09-03 15:00

I can confirm this is a bug in the package on our website (the mountainlion package when installed on yosemite). The bug is not in neato, it's in the underlying graph parser. Emden pointed this out, and you can confirm it by running this
$ echo "digraph G { a->b a->b} " | /usr/local/bin/nop
digraph G {
    a -> b;

A fresh build on my local machine works OK. Not sure what goes wrong. I don't think I even have access to the build host any more. We really could use a CI build setup for OSX and get the builds away from AT&T, but it takes time and money.

I'd say to go with homebrew for now.
User avatar (0000970)
pluto (reporter)
2015-09-04 05:14

Thanks again for the quick response!
Unfortunately, this was not the issue. I installed from homebrew but this didn't change anything. In special for both versions the output of "nop" seems to be correct:

# echo "digraph G { a->b a->b} " | nop
digraph G {
    a -> b;
    a -> b;

(latest version 2.39.20150720.1238 (20150720.1238) with bugfix of ellson)

# echo "digraph G { a->b a->b} " | /usr/local/Cellar/graphviz/2.38.0/bin/nop
digraph G {
    a -> b;
    a -> b;

(homebrew version 2.38.0 (20140413.2041))

I only changes the few lines in edge.c in the latest version as I couldn't find a configure script in the github repository. Were there other changes that can cause this?

Or any other ideas?
User avatar (0000971)
ellson (administrator)
2015-09-04 10:00

If you are building from GIT sources, then you need to first run:

This is done normally on my builders during the preparation of the source packages:

There are additional requirements for running, as I recall
User avatar (0000972)
ellson (administrator)
2015-09-04 10:08

Re: comment 0000968

I think you must be using neato for "-Gsplines=true" to have any effect?

You probably are looking for "-Goverlap=false" to prevent the splines from overlapping nodes.
User avatar (0000973)
pluto (reporter)
2015-09-07 04:08

Yes, I used neato with "-Gsplines=true".
Unfortunately, "-Goverlap=false" does not change anything...
User avatar (0000974)
pluto (reporter)
2015-09-07 04:13

Thank you for the build hint for the GIT sources.
Now, I also tried now with the latest GIT snapshot (showed me as version 2.39.0 (0)) with the same false result (overlap=false did not change this, too)...
User avatar (0000975)
ellson (administrator)
2015-09-08 08:32

Works for me:

  echo "graph{{a b c} -- {d e f} -- {g h i}}" | neato -Gsplines=true -Goverlap=false

  echo "graph{{a b c} -- {d e f} -- {g h i}}" | fdp -Gsplines=true -Goverlap=false

Please provide example of failing graph.
User avatar (0000976)
pluto (reporter)
2015-09-10 15:40

Sorry for my late reply. Here is a more-or-less minimal example showing the difference:

Setting splines=true, the edge pairs 0->1, 0->2, 1->2 overlapp and look like a single edge, the edges from 1->2 do *not* overlapp with node 1:

echo "digraph G {0 [pos=\"0,0! \"]; 1 [pos=\"5,0! \"]; 2 [pos=\"10,0! \"];0->1 0->1 0->2 0->2 1->2 1->2}" | neato -Tps -Gsplines=true

Setting splines=false, the edge pairs 0->1, 0->2, 1->2 do *not* overlapp but the edges from 1->2 does overlapp with node 1:

echo "digraph G {0 [pos=\"0,0! \"]; 1 [pos=\"5,0! \"]; 2 [pos=\"10,0! \"];0->1 0->1 0->2 0->2 1->2 1->2}" | neato -Tps -Gsplines=false

The results are independent of -Goverlap is set to true or false (are left away).
The result using splines=false is as expected (but useless for me) but the overlapp of edges having same source/sing using splines=true is rather unexpected.

Any idea?
User avatar (0000977)
ellson (administrator)
2015-09-11 08:59

I'm not seeing an: "overlap of edges having same source/sink using splines=true"
but I do get some strange interactions when I try adding -Goverlap-false.

I'm suspicious of the use of "pos", particularly without a corresponding "-n" on the command line. For myself, I try to avoid forcing positions in graphviz layouts. (Graphviz is a visualization tool; there are much better alternatives for drawing tools.)

I know the docs say that pos input is in inches, but I suspect it may actually be in points, and that the numbers provided actually cause a node overlap. I don't understand what the '!' does? Look at the weird result this produces, for example:
    echo 'digraph {0 [pos="0,0! "]; 1 [pos="5,0! "]; 2 [pos="10,0! "];0->1 0->1 0->2 0->2 1->2 1->2}' | neato -Tx11 -Gsplines=true -n1
This looks better:
    echo 'digraph {0 [pos="0,0! "]; 1 [pos="250,0! "]; 2 [pos="500,0! "];0->1 0->1 0->2 0->2 1->2 1->2}' | neato -Tx11 -Gsplines=true -n1

Would something like this work for you?
   echo "digraph G {rankdir=LR; 0->1 0->1 0->2 0->2 1->2 1->2}" | dot -Tx11
User avatar (0000978)
pluto (reporter)
2015-09-11 15:54

Mhm, then it seems to be mac related? Your last example produced the same edge overlaps (see attached test.pdf). The 'This looks better' example, too.

The reason why to place the nodes at specific locations is that I need a node dedicated as "input" (or root) on the left and another node as "output" (or sink) on the right. In addition, some internal nodes. The dot files are generated automatically for about 100 graphs which have to be analyzed. Thats why I don't wan't to draw them by hand (and why I must see each edge).
User avatar (0000979)
pluto (reporter)
2015-09-11 16:02

Update: I tried the same examples as above (my post 0000976) under centOS Linux where

neato - graphviz version 2.26.0 (20091210.2329)

was installed and got the same result (overlapping edges). I can try to build the latest version on that machine but this may take some time and I'm wondering if the result will be really different.
User avatar (0000980)
erg (administrator)
2015-09-13 15:18

I'm not sure where things stand now, but let me comment on the attributes involved and some of their oddities:

 - neato allows nodes to provide initial pos attributes. If the attribute ends in an '!', that means the node is pinned and is not allowed to move. For historical reasons, neato reads the coordinates in inches and outputs them in points, (0000001 design mistake in graphviz) To help with this, neato accepts the -s flag to reads the coordinates in points.

 - neato -n requires all nodes to have an initial input pos and will not change it. So, if you know the positions of all your nodes, it's simpler to run neato -n which, by the way, requires the coordinates to be in points (one of our few breaks with backward compatibility).

  - Since your nodes are far enough apart, given your input is in inches, overlap=false will have no effect. Note, though, that if there is overlap and you set overlap=false, neato ignores -n or pinned nodes and adjust the positions to avoid overlap.

For references, the figures out1.png and out2.png show the output I get from the graphs in note 976. The figure out.png shows the dot ouput from the last line in note 977. The output from your graph is shown in out4.png. These were all run on a mac using the latest version of Graphviz.

If you are not getting similar output after fully updating your software, let us know.
User avatar (0001000)
pluto (reporter)
2015-11-18 10:25

I'm sorry not to respond faster - I had to defense my PhD ;-)

Figure out4.png is exactly what I want! But this didn't work with any setup I tried so far.
Could you please tell me the exact command how you got this and with which version you get this result?

Thank you!

- Issue History
Date Modified Username Field Change
2015-09-03 08:00 pluto New Issue
2015-09-03 08:00 pluto File Added:
2015-09-03 11:14 ellson Assigned To => ellson
2015-09-03 11:14 ellson Status new => assigned
2015-09-03 11:14 ellson Note Added: 0000967
2015-09-03 11:17 ellson FIX-COMMENT => repaired test for multiedges in id comparison
2015-09-03 11:17 ellson Status assigned => resolved
2015-09-03 11:17 ellson Resolution open => fixed
2015-09-03 11:40 pluto File Added:
2015-09-03 11:44 pluto Note Added: 0000968
2015-09-03 11:44 pluto Status resolved => feedback
2015-09-03 11:44 pluto Resolution fixed => reopened
2015-09-03 15:00 north Note Added: 0000969
2015-09-04 05:14 pluto Note Added: 0000970
2015-09-04 05:14 pluto Status feedback => assigned
2015-09-04 10:00 ellson Note Added: 0000971
2015-09-04 10:08 ellson Note Added: 0000972
2015-09-07 04:08 pluto Note Added: 0000973
2015-09-07 04:13 pluto Note Added: 0000974
2015-09-08 08:32 ellson Note Added: 0000975
2015-09-10 15:40 pluto Note Added: 0000976
2015-09-11 08:59 ellson Note Added: 0000977
2015-09-11 15:48 pluto File Added: test.pdf
2015-09-11 15:54 pluto Note Added: 0000978
2015-09-11 16:02 pluto Note Added: 0000979
2015-09-13 14:59 erg File Added: out2.png
2015-09-13 14:59 erg File Added: out1.png
2015-09-13 15:00 erg File Added: out.png
2015-09-13 15:18 erg Note Added: 0000980
2015-09-13 15:19 erg File Added: out4.png
2015-11-18 10:25 pluto Note Added: 0001000

MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker