Graphviz allows labels to be specified via "HTML-Like labels", as shown e.g. in section 2.3 of the Drawing graphs with dot User's Guide.
That gives examples of how to change the font color, but specifying
<FONT SIZE="8">text</FONT>
results in an error message
Warning: Illegal attribute SIZE in <FONT> - ignored
How can the font size of "HTML-Like" labels be manipulated?
In HTML, you can change the size of text with the <font> tag using the size attribute. The size attribute specifies how large a font will be displayed in either relative or absolute terms. Close the <font> tag with </font> to return to a normal text size.
By entering a value of "+1" for the size attribute you designate your text to be displayed one size bigger which then equates to size 4. Likewise a value of "+2" equates to font size 5. Going in the other direction, a value of "-1" equates to size 2 and "-2" equates to size 1 (basefont size 3 - 2 = font size 1).
You can change the color and size of your text right inside its tag with the color and font-size properties. This is known as inline CSS. You do it with the style attribute in HTML.
The term "HTML-Like labels" reflects the fact that a full HTML implementation is not included, and the syntax varies from HTML at times. For details see the documentation on Node Shapes | Graphviz - Graph Visualization Software.
There you will see that font sizes can be specified via the "POINT-SIZE" attribute. E.g.
<FONT POINT-SIZE="8">text</FONT>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With