layoutgraphvizgraph-drawinglabeling

Marking/labeling node-edge connection points with graphviz


With Graphviz, I know I can label edges and vertices. But what if I want to label some of the connections? That is, label some points where a specific edge meets a specific vertex? Is that possible?

Notes:


Solution

  • You can use the taillabel and headlabel edges attributes. For example:

    digraph G {
            rankdir="LR";
            a->b [taillabel="from"; headlabel="to"]
            b->c [taillabel="from"; headlabel="to"]
    }
    

    produce:

    example