# Controlling the convex / curvature of edges

**URL:** <https://forum.graphviz.org/t/controlling-the-convex-curvature-of-edges/2399>\
**Category:** Help\
**Created:** [August 18, 2024, 8:31am UTC](https://forum.graphviz.org/t/controlling-the-convex-curvature-of-edges/2399 "2024-08-18T08:31:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [August 18, 2024, 5:33pm UTC](https://forum.graphviz.org/t/controlling-the-convex-curvature-of-edges/2399/2 "2024-08-18T17:33:10Z")

</div>

[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](https://forum.graphviz.org/t/a-program-to-fix-simple-edges/1792) 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:

 ![peace2](https://global.discourse-cdn.com/graphviz/original/2X/d/df0888c99b6615dbd2b1e868511ab43ec7eac427.png)

p.s. my [gvlint](https://forum.graphviz.org/t/a-lint-program-for-graphviz-files/2209) program says:

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

```

---

_[View the full topic](https://forum.graphviz.org/t/controlling-the-convex-curvature-of-edges/2399)._
