MatthewRock
MatthewRock

Reputation: 1091

How to create double labelled edges in Graphviz?

I would like to create more than one label for one edge. The result I'm interested in looks like this:

enter image description here

Note that the edge {0,2} has two labels: e and z. One is above the edge, the other one - below. This is the exact outcome I want. How can I achieve this?

Upvotes: 1

Views: 1857

Answers (1)

Nick Roz
Nick Roz

Reputation: 4250

Have you tried

digraph G {
  graph [ splines = false rankdir="LR" ]
  a -> b [ label = "foo" ];
  a -> b [ label = "bar" ];
}

I've checked it using http://www.webgraphviz.com/

Result looks like

Two labels

Taken from stackoverflow question Graphviz, grouping the same edges

Upvotes: 3

Related Questions