Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to draw 2 labels on edge in a .dot file?

Tags:

graphviz

dot

I have for now a dot file generating the following graph

   label

[A] -----------> [b]

and I want to change it to something like:

[A] label 1 ------> label 2 [b]

Is there any way to express that in my .dot file ? I am not sure this is possible.

like image 436
Manuel Selva Avatar asked Nov 22 '13 15:11

Manuel Selva


1 Answers

An edge can have a taillabel and a headlabel attribute:

a -> b[headlabel="head", taillabel="tail"];

Those labels are displayed near the tail and the head of the edge.

like image 134
marapet Avatar answered Sep 30 '22 05:09

marapet