Showing posts with label figures. Show all posts
Showing posts with label figures. Show all posts

Tuesday, 27 March 2012

Padding for superscript and subscript axis labels in gnuplot

By default gnuplot doesn't align superscripts and subscripts:
T_c^{/Symbol \245}

But, that leaves an ugly space between the symbol and superscript. You can force alignment with an @ character:

T@_c^{/Symbol \245}
 This works fine for standard characters, but for slanted variables, the align character makes the superscript overlap. To fix this we insert a partial before the infty symbol in the superscript. To do this we combine two text effects, blank characters &{a} and font size scaling {/* }:

T@_c^{{/*0.5 &{c}}{/Symbol \245}}

To give the desired result. You can change the factor 0.5 to whatever you need, with 1.0 being full character width.