Distinct colors for headlabel and taillabel in graphviz

前端 未结 1 757
野趣味
野趣味 2021-02-15 15:26

Is it possible to set distinct colors for headlabel and taillabel in graphviz? Using labelfontcolor I can set one common color for both of them but I need different colors (some

1条回答
  •  死守一世寂寞
    2021-02-15 15:40

    You can succeed doing this using the HTML-style labels in graphviz (you can find lots of information on this page: http://www.graphviz.org/doc/info/shapes.html), and particularly the font one:

    digraph test
    {
        A -> B
        [
            taillabel = <tail>
            label     = <middle>
            headlabel = <head>
        ]
    }
    

    This code will produce the following diagram:

    enter image description here

    0 讨论(0)
提交回复
热议问题