# Better edge labels on ortho edges

**URL:** https://forum.graphviz.org/t/better-edge-labels-on-ortho-edges/2425
**Category:** Show and Tell
**Created:** [September 3, 2024, 2:20pm UTC](https://forum.graphviz.org/t/better-edge-labels-on-ortho-edges/2425 "2024-09-03T14:20:04Z")
**Posts on this page:** 1
**Page:** 1

<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: [September 3, 2024, 2:20pm UTC](https://forum.graphviz.org/t/better-edge-labels-on-ortho-edges/2425/1 "2024-09-03T14:20:04Z")

</div>

The **splines** [documentation](https://www.graphviz.org/docs/attrs/splines/) says this about **ortho**

```auto
Currently, the routing does not handle ports or, in dot, edge labels.

```

This left me wondering what **dot** does with ortho edge labels, and what **neato** does differently (if anything)

A quick experiment shows that **dot** does _something_ with ortho edge labels (not _that_ bad a result) (see below) but **neato** produces an arguably better result (also below).  
And by pipelining **dot** and **neato** , we can get a **dot** node layout and a **neato** edge and edge label layout. Fun!

The test graph:

```auto
/ ***************************************************************************
  compare the results:
   dot orthoLabelTest.gv -Tpng -Glabel="edges by dot" >look.dot.png
   dot orthoLabelTest.gv |neato -n -Tpng -Glabel="edges by neato" >look.neato.png
**************************************************************************** /

digraph orthoLabelTest {
  splines=ortho
  a -> {b b1 b2} [label="small"]
  b -> {c c1 c2} [label="a\nto\nb"]
  c -> {d d1 d2} [label="not very small at all"]
  d -> {e e1 e2} [label=<<B>Bold!!</B>>]
}

```

The command lines:

```auto
dot orthoLabelTest.gv -Tpng -Glabel="edges by dot" >look.dot.png
dot orthoLabelTest.gv |neato -n -Tpng -Glabel="edges by neato" >look.neato.png

```

**dot** result:

 ![look.dot](https://global.discourse-cdn.com/graphviz/original/2X/7/73744d70a2ddc86e57660089f0c7a300fb2370a5.png)

**neato** result:

 ![look.neato](https://global.discourse-cdn.com/graphviz/original/2X/9/903b4552285fd61869548ac9c86567288e66d98c.png)
