# Pointy edges in places where straight edges fit

**URL:** <https://forum.graphviz.org/t/pointy-edges-in-places-where-straight-edges-fit/1282>\
**Category:** Help\
**Created:** [August 7, 2022, 11:40am UTC](https://forum.graphviz.org/t/pointy-edges-in-places-where-straight-edges-fit/1282 "2022-08-07T11:40:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayzchen](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@rayzchen](https://forum.graphviz.org/u/rayzchen)\
**Post date:** [August 7, 2022, 11:40am UTC](https://forum.graphviz.org/t/pointy-edges-in-places-where-straight-edges-fit/1282/1 "2022-08-07T11:40:46Z")

</div>

Dot is giving me funny edges sometimes, like the one in bold red:

 ![image](https://global.discourse-cdn.com/graphviz/original/1X/95188afad77c274f9ae23d72ae5283d555656dee.png)

There’s also a bump on the edge next to the node labelled `pyunity.values.abc` which just feels sort of awkward. Is there any reason for these funny bumps and spikes?

---

<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 7, 2022, 3:45pm UTC](https://forum.graphviz.org/t/pointy-edges-in-places-where-straight-edges-fit/1282/2 "2022-08-07T15:45:42Z")

</div>

Bug.  
Maybe related to [dot creates ugly edge instead of simple curve (#2249) · Issues · graphviz / graphviz · GitLab](https://gitlab.com/graphviz/graphviz/-/issues/2249), but maybe not - the graphs are not very similar.  
Consider adding to #2249 or creating a new issue. Please include your source, OS, command line, and Graphviz version (`dot -V`)  
If you provide your source, there is an easy expe3riment I’d like to try: removing the two goofy edges and then using `neato -n2` ([FAQ | Graphviz](https://www.graphviz.org/faq/#FaqDotWithCoords)) to re-layout just those two edges. I wonder if they will still be goofy.

---

<div class="post-metadata">

**Author:** ![rayzchen](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@rayzchen](https://forum.graphviz.org/u/rayzchen)\
**Post date:** [August 8, 2022, 9:19am UTC](https://forum.graphviz.org/t/pointy-edges-in-places-where-straight-edges-fit/1282/3 "2022-08-08T09:19:22Z")

</div>

Source: [https://sketchviz.com/@rayzchen/c0c0f4968aff34bfa620f6d1582600b3 · GitHub](https://gist.github.com/rayzchen/c0c0f4968aff34bfa620f6d1582600b3)  
OS: Windows 10  
Command line: `dot -Tsvg graph.dot > graph.svg`  
Version: `dot - graphviz version 3.0.0 (20220226.1711)`

---

<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 8, 2022, 6:25pm UTC](https://forum.graphviz.org/t/pointy-edges-in-places-where-straight-edges-fit/1282/4 "2022-08-08T18:25:32Z")

</div>

Hmmm,

1. Graphviz 5.0.0 is available for download. It might produce a different (better?) result.
2. Releases 4.0.0 & 5.0.0 give me different (fewer ziggies) results. Linux also gives different (fewer ziggies) results
3. Here is a script (for Windows) that will redraw any set of edges you want. No guarantees that the edges will be “better” or even different, but they seem to be in this case. I’m not thrilled by the new routing, but “eye-of-the-beholder” thing.

- add `fix=1` to attributes of any edge you want rerouted. E.g. `a -- b [fix=1 style=dotted]`
- use a version of this command line (below).
  - **Dot** creates augmented output in the **dot** input language
  - **gvpr** ([https://graphviz.org/pdf/gvpr.1.pdf](https://graphviz.org/pdf/gvpr.1.pdf)) deletes the edge **pos** for every edge with fix==1
  - `neato -n2` recreates the edges without a **pos** value (no route), but does not alter the positioning of any other node or edge ([FAQ | Graphviz](https://www.graphviz.org/faq/#FaqDotWithCoords))

```auto
dot pyunity1.gv | gvpr -c "E[fix=='1']{$.pos='';$.lp='';}" |neato -G"splines=true" -n2 -Tpng 
>OO.5.0.0.png

```

Result on my Windows system:

 ![OO.5.0.0](https://global.discourse-cdn.com/graphviz/original/1X/46a4e65da6f9d97f92bb875258260b02a528b849.png)

---

<div class="post-metadata">

**Author:** ![scnorth](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/scnorth/32/89_2.png) [@scnorth](https://forum.graphviz.org/u/scnorth)\
**Post date:** [August 9, 2022, 12:32pm UTC](https://forum.graphviz.org/t/pointy-edges-in-places-where-straight-edges-fit/1282/5 "2022-08-09T12:32:19Z")

</div>

This is a bug, but we don’t know exactly what’s wrong. It appears there could be a sign that is flipped somewhere, for example we coded something like the equivalent of `x = x - boxwidth` instead of `x = x + boxwidth`. As you may have noticed already, the spline code is not that easy to read, and there’s some idea of working on more general spline debugging support (i.e. render the control polygon of any spline on demand) before attacking this particular problem. Sorry about the bug.

---

<div class="post-metadata">

**Author:** ![Vithanco](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/vithanco/32/292_2.png) [@Vithanco](https://forum.graphviz.org/u/Vithanco)\
**Post date:** [August 11, 2022, 12:32pm UTC](https://forum.graphviz.org/t/pointy-edges-in-places-where-straight-edges-fit/1282/6 "2022-08-11T12:32:13Z")

</div>

I was able to fix this kind of issues a few time by adding space to the rank separation. So, if we want to find the bug then we should look at the impact of rank space.
