[dot] edge bend outside, not inside

Hi @all,

I have troble with the graph at the end of this post. There is an overlapping edge (the last colored one) which could be avoided easily.

How can I tell DOT to prefere drawing edges (nodes are in one line) below (without ports)?

Required is:
- no use of ports (e.g. "s" in this example)
- usage of the shown rank=same

Doesn't matter if:
- edges have to increase the size of the image (would be the case in my example)

BTW: If I use label "test" as shown below, my DOT hangs (an algorithm does not terminate) if I use two ports in addition, i.e., "x0:s -> x2:s". Could this be because of bug #1722?

Thanks for your comments!

node [shape=circle]
 a->x0 [label="1"]
 a->x1 [label="2"]
 a->x2 [label="3"]
 edge [ color="#0000FF"]
 x0 -> x2 [label="test"]

[dot] edge bend outside, not

Dot's flat edge model is very simple. It doesn't concern itself with edge crossings due to flat edges, but basically always routes the flat edge in the space above the rank, and that is also where it always places an edge label. This last is why dot hangs when you add the :s (and this is the same problem as bug 1671 nee 1722).
If you are willing to accept the need for adding the :s modifiers, and can download the most recent working version, you can get what you want using external labels.

[dot] edge bend outside, not

Thanks for your explanatory answer.
Maybe, a stupid question now... where can I find information about the feature "external labels" and what exactly is the most recent working version? Nightly build?
Yesterday I even experimented with graphviz-bin-2.29.20110901.0445 already, so maybe this one?

[dot] edge bend outside, not

The most recent working versions are built nightly (barring glitches in the build) and can via the appropriate system links at http://www.graphviz.org/Download..php under Developement Snapshot. Your 2.29 version should be fine.
As for external labels, these are specified using the xlabel attribute. Basically, the graph is first laid out, and then these labels are placed, while trying to avoid overlapping nodes and other labels. This information should be on the page http://www.graphviz.org/content/attrs but for some reason it's not there yet.
For your example, you can replace the edge labels with edge xlabels, and then use :s for both ends of the flat edge.

Recent comments