Graph with specific arrows

Hi!
I'd like to create graph in dot.exe with arrows, which have labels on two sides.

label1
---------->
label2

It is possible?

Graph with specific arrows - try this

Hi pawelkrz,

For labels on the top and bottom of your edge, you might try something like this:

test1 -> test2 [label="top" color=white];

test1 -> test2 [label="bottom"];

{rank=same; test1 test2};

 

Re: Graph with specific arrows

Can you use headlabel & taillabel ?    These are positioned at the ends of the edge, but there are no guarantees that they are on opposite sides.

digraph {
    rankdir=LR
    A -> B [headlabel="to" taillabel="from"]
}

Or perhaps you can use a multiline label, but I don't think we can center it on the edge so that it straddles.

digraph {
        rankdir=LR
        A -> D [color="blue:red" dir=both label=<<table border="0">
                <tr><td><font color="red">to</font></td></tr>
                <tr><td><font color="blue">from</font></td></tr>
        </table>>]

}

 

 

Recent comments