Syntax:
set terminal [pslatex | pstex] {default} set terminal [pslatex | pstex] {rotate | norotate} {oldstyle | newstyle} {auxfile | noauxfile} {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}} {<font_size>}
If you see the error message
"Can't find PostScript prologue file ... "Please see and follow the instructions in postscript prologue (p. ).
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.
if rotate is specified, the y-axis label is rotated. 4#4font_size5#5 is the size (in pts) of the desired font.
If auxfile is specified, it directs the driver to put the PostScript commands into an auxiliary file instead of directly into the LaTeX file. This is useful if your pictures are large enough that dvips cannot handle them. The name of the auxiliary PostScript file is derived from the name of the TeX file given on the set output command; it is determined by replacing the trailing .tex (actually just the final extent in the file name) with .ps in the output file name, or, if the TeX file has no extension, .ps is appended. The .ps is included into the .tex file by a 2#2special{psfile=...} command. Remember to close the output file before next plot unless in multiplot mode.
Gnuplot versions prior to version 4.2 generated plots of the size 5 x 3 inches using the ps(la)tex terminal while the current version generates 5 x 3.5 inches to be consistent with the postscript eps terminal. In addition, the character width is now estimated to be 60% of the font size while the old epslatex terminal used 50%. To reach the old format specify the option oldstyle.
The pslatex driver offers a special way of controlling text positioning: (a) If any text string begins with '{', you also need to include a '}' at the end of the text, and the whole text will be centered both horizontally and vertically by LaTeX. (b) If the text string begins with '[', you need to continue it with: a position specification (up to two out of t,b,l,r), ']{', the text itself, and finally, '}'. The text itself may be anything LaTeX can typeset as an LR-box. 2#2rule{}{}'s may help for best positioning.
The options not described here are identical to the Postscript terminal. Look there if you want to know what they do.
Examples:
set term pslatex monochrome rotate # set to defaultsTo write the PostScript commands into the file "foo.ps":
set term pslatex auxfile set output "foo.tex"; plot ...; set outputAbout label positioning: Use gnuplot defaults (mostly sensible, but sometimes not really best):
set title '\LaTeX\ -- $ \gamma $'Force centering both horizontally and vertically:
set label '{\LaTeX\ -- $ \gamma $}' at 0,0Specify own positioning (top here):
set xlabel '[t]{\LaTeX\ -- $ \gamma $}'The other label – account for long ticlabels:
set ylabel '[r]{\LaTeX\ -- $ \gamma $\rule{7mm}{0pt}}'
Linewidths and pointsizes may be changed with set style line.