Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do italic node labels with GraphViz dot?

I'm trying to draw some graph using graphviz with dot. It works fine. However, I would like to set the font to italic for letters (a,b,c...). Here is my code:

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

What should I do so that 'a' 'b' 'c' and 'd' would be in italics but not the '{' and '}'?

like image 566
Phil Avatar asked Jun 29 '15 16:06

Phil


Video Answer


1 Answers

You may try using the syntax for Html-like labels and first define the node a with a label attribute:

a [label=<{<I>a</I>}>]
"Ø" -> a
like image 53
marapet Avatar answered Oct 02 '22 09:10

marapet