making digraph edges to and from two nodes follow the same route

Greetings. A graphviz input file is generated from other data and it looks something like this:

strict digraph {
# varying amount of other nodes and edges

I want the edges from a->b and b->a to follow almost the same route, so that they run next to each other, kind of like the 2 lanes in opposite directions on a road with a median. They tend to do this when the "varying amount" is small, but they often go very different ways when there is a lot of intervening material. If need be I can modify the converter to pre-cluster the edges so the to/from edges are always sequential. However, it would be nice if there was some switch that could be added that would make this happen automatically.


The smallest example that

The smallest example that showed this triggers this site's "spam" filter.  Here is a link to it (retrieve only):

The command is:

dot -Tsvg dot_example.txt >dot_example.svg

then view in firefox.  I'm referring to the two edges labeled "40" that start or end on node 8973762(42):40,49 at top center of the image.

This is on Centos, RPM pacakge graphviz-2.26.0-10.el6.x86_64.



Could you post a small

Could you post a small example exhibiting the bad behavior? (Also, what command are you running and what version of Graphviz?) In theory, the two edges are treated as a single edge until time for edge routing, at which point the two routings should be roughly parallel.

Recent comments