next up previous contents
Next: 34.49.56 Pstricks Up: 34.49 Terminal Previous: 34.49.54 Postscript

34.49.55 Pslatex and pstex

The pslatex and pstex drivers generate output for further processing by LaTeX and TeX, respectively. Figures generated by pstex can be included in any plain-based format (including LaTeX).

Syntax:

     set terminal pslatex | |pstex {<color>} {<dashed>} {<rotate>}
                                   {auxfile} {<font_size>}

$<$color$>$ is either color or monochrome. $<$rotate$>$ is either rotate or norotate and determines if the y-axis label is rotated. $<$font_size$>$ 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. Remember to close the file before leaving gnuplot.

All drivers for LaTeX offer a special way of controlling text positioning: 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. -- 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. $\backslash$rule{}{}'s may help for best positioning.

Examples:

     set term pslatex monochrome dashed rotate       # set to defaults

To write the PostScript commands into the file "foo.ps":
     set term pslatex auxfile
     set output "foo.tex"; plot ...: set output

About 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,0

Specify 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 linestyle.


next up previous contents
Next: 34.49.56 Pstricks Up: 34.49 Terminal Previous: 34.49.54 Postscript
Shigeharu TAKENO
2002年 11月 16日