Postscript

Several options may be set in the postscript driver.

Syntax:

     set terminal postscript {<mode>} {color | monochrome}
                             {solid | dashed} {<duplexing>}
                             {enhanced | noenhanced}
                             {"<fontname>"} {<fontsize>}

where <mode> is landscape, portrait, eps or default solid draws all plots with solid lines, overriding any dashed patterns; <duplexing> is defaultplex, simplex or duplex ("duplexing" in PostScript is the ability of the printer to print on both sides of the same page — don't set this if your printer can't do it); enhanced activates the "Enhanced PostScript" features (subscripts, superscripts and mixed fonts); "<fontname>" is the name of a valid PostScript font; and <fontsize> is the size of the font in PostScript points.

default mode sets all options to their defaults: landscape, monochrome, dashed, defaultplex, noenhanced, "Helvetica" and 14pt.

Default size of a PostScript plot is 10 inches wide and 7 inches high.

eps mode generates EPS (Encapsulated PostScript) output, which is just regular PostScript with some additional lines that allow the file to be imported into a variety of other applications. (The added lines are PostScript comment lines, so the file may still be printed by itself.) To get EPS output, use the eps mode and make only one plot per file. In eps mode the whole plot, including the fonts, is reduced to half of the default size.

Examples:

     set terminal postscript default       # old postscript
     set terminal postscript enhanced      # old enhpost
     set terminal postscript landscape 22  # old psbig
     set terminal postscript eps 14        # old epsf1
     set terminal postscript eps 22        # old epsf2
     set size 0.7,1.4; set term post portrait color "Times-Roman" 14
Enhanced postscript

Enhanced Text Control Codes
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

{text} can be used to allow multiple-character text, where only a single character is expected (e.g., 2^{10}). To change the font and/or size, use the full form: {/[fontname][=fontsize] text} (For example, {/Symbol=20 G} is a 20 point GAMMA). (The '/' character MUST be the first character after the '{'.)

If the encoding vector has been changed by set 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 will not apply any other encoding vector to it.

The phantom box is useful for a@^b_c to align superscripts and subscripts, and for overwriting an accent on a letter. (The latter is tricky; it is much easier 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.) It is common sense to put the shorter of the two in the phantom box.

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 subdirectory of the gnuplot source distribution contains more examples of the enhanced syntax.