Postscript

Several options may be set in the postscript driver.

Syntax:

     set terminal postscript {default}
     set terminal postscript {landscape | portrait | eps}
                             {enhanced | noenhanced}
                             {defaultplex | simplex | duplex}
                             {fontfile {add | delete} "<filename>"
                              | nofontfiles} {{no}adobeglyphnames}
                             {level1 | leveldefault | level3}
                             {color | colour | monochrome}
                             {background <rgbcolor> | nobackground}
                             {dashlength | dl <DL>}
                             {linewidth | lw <LW>} {pointscale | ps <PS>}
                             {rounded | butt}
                             {clip | noclip}
                             {palfuncparam <samples>{,<maxdeviation>}}
                             {size <XX>{unit},<YY>{unit}}
                             {blacktext | colortext | colourtext}
                             {{font} "fontname{,fontsize}" {<fontsize>}}
                             {fontscale <scale>}
If you see the error message
     "Can't find PostScript prologue file ... "
Please see and follow the instructions in postscript prologue (p. [*]).

landscape and portrait choose the plot orientation. 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.

enhanced enables enhanced text mode features (subscripts, superscripts and mixed fonts). See enhanced (p. [*]) for more information. blacktext forces all text to be written in black even in color mode;

Duplexing in PostScript is the ability of the printer to print on both sides of the same sheet of paper. With defaultplex, the default setting of the printer is used; with simplex only one side is printed; duplex prints on both sides (ignored if your printer can't do it).

"4#4fontname5#5" is the name of a valid PostScript font; and 4#4fontsize5#5 is the size of the font in PostScript points. In addition to the standard postscript fonts, an oblique version of the Symbol font, useful for mathematics, is defined. It is called "Symbol-Oblique".

default sets all options to their defaults: landscape, monochrome, dl 1.0, lw 1.0, defaultplex, enhanced, "Helvetica" and 14pt. Default size of a PostScript plot is 10 inches wide and 7 inches high. The option color enables color, while monochrome prefers black and white drawing elements. Further, monochrome uses gray palette but it does not change color of objects specified with an explicit colorspec. dashlength or dl scales the length of dashed-line segments by 4#4DL5#5, which is a floating-point number greater than zero. linewidth or lw scales all linewidths by 4#4LW5#5.

By default the generated PostScript code uses language features that were introduced in PostScript Level 2, notably filters and pattern-fill of irregular objects such as filledcurves. PostScript Level 2 features are conditionally protected so that PostScript Level 1 interpreters do not issue errors but, rather, display a message or a PostScript Level 1 approximation. The level1 option substitutes PostScript Level 1 approximations of these features and uses no PostScript Level 2 code. This may be required by some old printers and old versions of Adobe Illustrator. The flag level1 can be toggled later by editing a single line in the PostScript output file to force PostScript Level 1 interpretation. In the case of files containing level 2 code, the above features will not appear or will be replaced by a note when this flag is set or when the interpreting program does not indicate that it understands level 2 PostScript or higher. The flag level3 enables PNG encoding for bitmapped images, which can reduce the output size considerably.

rounded sets line caps and line joins to be rounded; butt is the default, butt caps and mitered joins.

clip tells PostScript to clip all output to the bounding box; noclip is the default.

palfuncparam controls how set palette functions are encoded as gradients in the output. Analytic color component functions (set via set palette functions) are encoded as linear interpolated gradients in the postscript output: The color component functions are sampled at 4#4samples5#5 points and all points are removed from this gradient which can be removed without changing the resulting colors by more than 4#4maxdeviation5#5. For almost every useful palette you may safely leave the defaults of 4#4samples5#5=2000 and 4#4maxdeviation5#5=0.003 untouched.

The default size for postscript output is 10 inches x 7 inches. The default for eps output is 5 x 3.5 inches. The size option changes this to whatever the user requests. By default the X and Y sizes are taken to be in inches, but other units are possibly (currently only cm). The BoundingBox of the plot is correctly adjusted to contain the resized image. Screen coordinates always run from 0.0 to 1.0 along the full length of the plot edges as specified by the size option. NB: this is a change from the previously recommended method of using the set size command prior to setting the terminal type. The old method left the BoundingBox unchanged and screen coordinates did not correspond to the actual limits of the plot.

Fonts listed by fontfile or fontfile add encapsulate the font definitions of the listed font from a postscript Type 1 or TrueType font file directly into the gnuplot output postscript file. Thus, the enclosed font can be used in labels, titles, etc. See the section postscript fontfile (p. [*]) for more details. With fontfile delete, a fontfile is deleted from the list of embedded files. nofontfiles cleans the list of embedded fonts.

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
     set term post "VAGRoundedBT_Regular" 14 fontfile "bvrr8a.pfa"

Linewidths and pointsizes may be changed with set style line.

The postscript driver supports about 70 distinct pointtypes, selectable through the pointtype option on plot and set style line.

Several possibly useful files about gnuplot's PostScript are included in the /docs/psdoc subdirectory of the gnuplot distribution and at the distribution sites. These are "ps_symbols.gpi" (a gnuplot command file that, when executed, creates the file "ps_symbols.ps" which shows all the symbols available through the postscript terminal), "ps_guide.ps" (a PostScript file that contains a summary of the enhanced syntax and a page showing what the octal codes produce with text and symbol fonts), "ps_file.doc" (a text file that contains a discussion of the organization of a PostScript file written by gnuplot), and "ps_fontfile_doc.tex" (a LaTeX file which contains a short documentation concerning the encapsulation of LaTeX fonts with a glyph table of the math fonts).

A PostScript file is editable, so once gnuplot has created one, you are free to modify it to your heart's desire. See the editing postscript (p. [*]) section for some hints.


Subsections