I want draw a superscript on Node in using of dot language.
Is this possible?
The xlabel attribute creates an external label for a node or edge. The following will get you part of the way there. Once you have your entire graph created you can play with spacing to avoid overlaps.
xlabel
graph { node [shape = circle]; edge [style = dashed; minlen = 2]; NOP [style = dashed; xlabel = "0"]; node [label = "*"]; n1 n2 n3 n6 n8; n1 [xlabel = "1"]; n2 [xlabel = "2"]; n3 [xlabel = "3"]; n6 [xlabel = "6"]; n8 [xlabel = "8"]; n10 [xlabel = "10"]; NOP -- n1; NOP -- n2; NOP -- n3; NOP -- n6; NOP -- n8; n10 [label = "+"]; NOP -- n10; }
The
xlabel
attribute creates an external label for a node or edge. The following will get you part of the way there. Once you have your entire graph created you can play with spacing to avoid overlaps.