Control Examples Explanation
^ a^x superscript
_ a_x subscript
@ @x or a@^b_c phantom box (occupies no width)
& &{space} inserts space of specified length
Braces can be used to place multiple-character text where a single character
is expected (e.g., 2^{10}). To change the font and/or size, use the full
form: {/[fontname][=fontsize | *fontscale] text}. Thus {/Symbol=20 G} is a
20-point GAMMA) and {/*0.75 K} is a K at three-quarters of whatever fontsize
is currently in effect. (The '/' character MUST be the first character after
the '{'.)
If the encoding vector has been changed by `set encoding` (Note:encoding ),
the default encoding vector can be used instead by following the slash with a
dash. This is unnecessary if you use the Symbol font, however---since /Symbol
uses its own encoding vector, `gnuplot` (Note:gnuplot ) will not apply any
other encoding vector to it.
The phantom box is useful for a@^b_c to align superscripts and subscripts
but does not work well for overwriting an accent on a letter. (To do the
latter, it is much better to use `set encoding iso_8859_1` to change to the
ISO Latin-1 encoding vector, which contains a large variety of letters with
accents or other diacritical marks.) Since the box is non-spacing, it is
sensible to put the shorter of the subscript or superscript in the box (that
is, after the @).
Space equal in length to a string can be inserted using the '&' character.
Thus
'abc&{def}ghi'
would produce
'abc ghi'.
You can access special symbols numerically by specifying \character-code (in
octal), e.g., {/Symbol \245} is the symbol for infinity.
You can escape control characters using \, e.g., \\, \{, and so on.
But be aware that strings in double-quotes are parsed differently than those
enclosed in single-quotes. The major difference is that backslashes may need
to be doubled when in double-quoted strings.
Examples (these are hard to describe in words---try them!):
set xlabel 'Time (10^6 {/Symbol m}s)'
set title '{/Symbol=18 \362@_{/=9.6 0}^{/=12 x}} \
{/Helvetica e^{-{/Symbol m}^2/2} d}{/Symbol m}'
The file "ps_guide.ps" in the /docs/ps subdirectory of the `gnuplot` source
distribution contains more examples of the enhanced syntax.