Latex

Note: Legacy terminal (not built by default). The latex, emtex, eepic, and tpic terminals in older versions of gnuplot provided minimal support for graphics styles beyond simple lines and points. They have been directly superseded by the pict2e terminal. For more capable TeX/LaTeX compatible terminal types see cairolatex (p. [*]), context (p. [*]), epslatex (p. [*]), mp (p. [*]), pstricks (p. [*]), and tikz (p. [*]).

Syntax:

     set terminal {latex | emtex} {default | {courier|roman} {<fontsize>}}
                  {size <XX>{unit}, <YY>{unit}} {rotate | norotate}
                  {color | monochrome}

By default the plot will inherit font settings from the embedding document. You have the option of forcing either Courier (cmtt) or Roman (cmr) fonts instead. In this case you may also specify a fontsize. Unless your driver is capable of building fonts at any size (e.g. dvips), stick to the standard 10, 11 and 12 point sizes.

METAFONT users beware: METAFONT does not like odd sizes.

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. If the text string begins with '[', you need to follow this 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.

Points, among other things, are drawn using the LaTeX commands "2#2Diamond" and "2#2Box". These commands no longer belong to the LaTeX2e core; they are included in the latexsym package, which is part of the base distribution and thus part of any LaTeX implementation. Please do not forget to use this package. Other point types use symbols from the amssymb package.

The default size for the plot is 5 inches by 3 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 possible (currently only cm).

If rotate is specified, rotated text, especially a rotated y-axis label, is possible (the packages graphics or graphicx are needed). The 'stacked' y-axis label mechanism is then deactivated. This will also significantly improve the quality of line drawing, and is default since version 5.3.

The option color enables color, while monochrome uses only black and white drawing elements. You need to load the color or xcolor package in the preamble of your latex document.

Examples: 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}}'