Closed fedarko closed 7 years ago
Turns out setting splines=polyline
(mostly) fixes this problem, at least for the specified graph.
...of course, it'd be nice to have both normal splines and non-crossing edges, so I don't think I'm going to implement that fix just yet.
So this might be an issue with my installed version of Graphviz? Using Webgraphviz produces a layout with, as far as I can see, no edge-node crossings.
I'll see if I can find what version of Graphviz Webgraphviz is using. I'm using version 2.40.1 on my system, but perhaps that's out of date (or perhaps Webgraphviz is using an older version, and a newer version of Graphviz broke something?).
Update -- looks like Webgraphviz is using viz.js, and I wasn't able to quickly find out which version of Graphviz either is using at present. Trying the development snapshot of Graphviz to see if this problem has been fixed.
Update 2 -- the latest development snapshot (graphviz-2.41.20170706.1447.tar.gz
) didn't seem to fix the problem. Neither does the graphviz-working.tar.gz
release. I guess I'll try older versions of Graphviz? Also, I should probably open an issue in the Graphviz repository on GitHub or something about this.
Welp, I guess that settles it. Using version 2.38.0 of Graphviz fixes this problem on sample_LastGraph
.
The downside of using version 2.38.0 is that triangle smoothing in sfdp seems to no longer be usable (keeping it seems to crash pygraphviz somewhere along the line), but I think this is a worthy sacrifice to make, at least for now.
TODO for this:
This behavior has been addressed in Graphviz; the development snapshot numbered graphviz-2.41.20170712.0019.tar.gz
works fine for me. (See this issue in the Graphviz repository for details.)
(made the title of this issue a bit clearer, since the README currently links to it)
I'm not sure why this is happening. See
sample_LastGraph.db
, which (particularly at the "top"/"far left" of the laid graph) has a few backfilled cluster nodes where edges are partially diagonally routed through them. This is undesirable -- if we can fix this in GraphViz, then the viewer interface's layout will look a lot nicer.Alternatively, I suppose it'd be possible to identify edge control points that lie "within" nodes (in particular, it seems all or at least most of these undesirably-routed edges pass through their source/target nodes, so we can constrain the "collision" search to those nodes) and reroute them accordingly, but I'm not sure how we'd go about rerouting the edges accordingly (in particular, for densely packed regions of the graph, a naive approach to that problem might result in introducing further undesirable crossings).
Anyway, something to think about. I've looked through Graphviz' attributes and haven't found any suitable dot settings for this problem, but I'll keep looking.