Centering label of edges

I'm not very experienced with dot so far.

I am missing an attribute that will center the label text of an edge (arc between two nodes) over the arc itself. By default the labels are placed at the right side of the arc.

Is there any possibility to center (overlay) the position of the label ?

Thank you in advance for your help

In dot, edge labels are

In dot, edge labels are handled as dummy nodes with the edge purposely routed beside it. You could try using xlabels. This will probably be a bit closer to what you want. Beyond that, you could postprocess the graph to shift the labels on top of the edges.

Recent comments