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

2019-04-25 17:52发布

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.

标签: graphviz dot
1条回答
贼婆χ
2楼-- · 2019-04-25 18:25

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.

查看更多
登录 后发表回答