Graphviz's HTML-like labels documentation suggests I can have a node labeled Uₓ with this .dot
file:
digraph G {
U [label=<U<SUB>X</SUB>>];
U->X
}
Unfortunately, the graph produced shows a node with UX instead of Uₓ:
Am I missing something to make the X in Uₓ subscript?
UPDATE: I'm outputting PNG images with dot mygraph.dot -Tpng -o mygraph.png
and receive no warnings or errors. The version is:
$ dot -V
dot - graphviz version 2.40.1 (20161225.0304)
Installed with brew
on macOS
UPDATE 2: I tried to output SVG with -Tsvg
instead of PNG with -Tpng
and I do get a subscript X
, sort of. The font size of X
is exactly the same as U
, just shifted down a little. Why is this so bad?