Different colors for the headlights and the back of the graphic

Is it possible to set different colors for headlabel and taillabel in graphviz? Using labelfontcolor, I can set one common color for both of them, but I need different colors (something like headfontcolor and tailfontcolor, but these attributes do not exist).

+4
source share
1 answer

You can achieve this by using HTML style labels in Graphviz (you can find a lot of information on this page: http://www.graphviz.org/doc/info/shapes.html ), and especially font one:

 digraph test { A -> B [ taillabel = <<font color="red">tail</font>> label = <<font color="green">middle</font>> headlabel = <<font color="blue">head</font>> ] } 

This code will create the following diagram:

enter image description here

+13
source

Source: https://habr.com/ru/post/1491122/


All Articles