How to make italics node labels with dot GraphViz?

I am trying to draw a graph using graphviz with a dot. It is working fine. However, I would like to set the font in italics for the letters (a, b, c ...). Here is my code:

digraph mygraph{ node [shape=plaintext] "Ø" -> "{a}" "Ø" -> "{b}" "Ø" -> "{c}" "Ø" -> "{d}" } 

What should I do to make 'a' 'b' 'c' and 'd' in italics, but not '{' and '}'?

+5
source share
1 answer

You can try using the syntax of Html-like labels and first define node a using the label attribute:

 a [label=<{<I>a</I>}>] "Ø" -> a 
+6
source

All Articles