Controlling the convex / curvature of edges

[I will use the terms cw & ccw for clock-wise & counter-clock-wise]

Short answer: no, there is no simple way to specify cw or ccw for an edge. And note that this concept has little or no meaning for a edge that wanders all around a graph.

Long answer: yes, it can be done (see below), but it require DIY edge routing. Here is a gvpr program that does what you ask. You could also write an equivalent in python, C, or other languages that talk Graphviz.
To get the image below:

  • added these attributes edgeType=curved edgeDirection=cw edgeOffset=22 to the last edge
  • used this pipeline f=peace2.gv; T=png;F=${f%.*};dot $f |gvpr -cf alterSimpleEdge.gvpr | neato -n2 -T$T >$F.$T

Giving:

p.s. my gvlint program says:

Bad value for ((Root) graph) G (nodesep = 0.0). Should be >= "0.02".
"penwidth" is not a defined (Root) graph attribute for "dot". 
1 Like