GNU Info

Info Node: (gnuplot.info)mp

(gnuplot.info)mp


Next: Metapost Instructions Prev: mf Up: terminal
Enter node , (file) or (file)node


 The `mp` driver produces output intended to be input to the Metapost program.
 Running Metapost on the file creates EPS files containing the plots. By
 default, Metapost passes all text through TeX.  This has the advantage of
 allowing essentially  any TeX symbols in titles and labels.

 The `mp` terminal is selected with a command of the form
    set term mp {color} {solid} {notex} {mag <magsize>} {"<name>"} {<size>}
 The option `color` causes lines to be drawn in color (on a printer or display
 that supports it), `monochrome` (or nothing) selects black lines.  The option
 `solid` (Note: solid ) draws solid lines, while dashed (or nothing) selects
 lines with different patterns of dashes.  If `solid` is selected but `color`
 is not, nearly all lines will be identical.  This may occasionally be useful,
 so it is allowed.

 The option `notex` bypasses TeX entirely, therefore no TeX code can be used in
 labels under this option.  This is intended for use on old plot files or files
 that make frequent use of common characters like `$` and `%` that require
 special handling in TeX.

 Changing font sizes in TeX has no effect on the size of mathematics, and there
 is no foolproof way to make such a change, except by globally  setting a
 magnification factor. This is the purpose of the `magnification` option. It
 must be followed by a scaling factor. All text (NOT the graphs) will be scaled
 by this factor. Use this if you have math that you want at some size other
 than the default 10pt. Unfortunately, all math will be the same size, but see
 the discussion below on editing the MP output. `mag` will also work under
 `notex` but there seems no point in using it as the font size option (below)
 works as well.

 A name in quotes selects the font that will be used when no explicit font is
 given in a `set label` (Note: label ) or  `set title` (Note: title ).  A
 name recognized by TeX (a TFM file exists) must be used.  The default is
 "cmr10" unless `notex` is selected, then it is "pcrr8r" (Courier).  Even under
 `notex`, a TFM file is needed by Metapost. The file `pcrr8r.tfm` is the name
 given to Courier in LaTeX's psnfss package.  If you change the font from the
 `notex` default, choose a font that matches the ASCII encoding at least in the
 range 32-126.  `cmtt10` almost works, but it has a nonblank character in
 position 32 (space).

 The size can be any number between 5.0 and 99.99.  If it is omitted, 10.0 is
 used.  It is advisable to use `magstep` sizes: 10 times an integer or
 half-integer power of 1.2, rounded to two decimals, because those are the most
 available sizes of fonts in TeX systems.

 All the options are optional.  If font information is given, it must be at the
 end, with size (if present) last.  The size is needed to select a size for the
 font, even if the font name includes size information.  For example,
 `set term mp "cmtt12"` selects cmtt12 shrunk to the default size 10.  This
 is probably not what you want or you would have used cmtt10.

 The following common ascii characters need special treatment in TeX:
    $, &, #, %, _;  |, <, >;  ^, ~,  \, {, and }
 The five characters $, #, &, _, and % can simply be escaped, e.g., `\$`.
 The three characters <, >, and | can be wrapped in math mode, e.g., `$<$`.
 The remainder require some TeX work-arounds.  Any good book on TeX will give
 some guidance.

 If you type your labels inside double quotes, backslashes in TeX code need to
 be escaped (doubled). Using single quotes will avoid having to do this, but
 then you cannot use `\n` for line breaks.  As of this writing, version 3.7 of
 gnuplot processess titles given in a `plot` (Note: plot ) command
 differently than in other places, and backslashes in TeX commands need to be
 doubled regardless of the style of quotes.

 Metapost pictures are typically used in TeX documents.  Metapost deals with
 fonts pretty much the same way TeX does, which is different from most other
 document preparation programs.  If the picture is included in a LaTeX document
 using the graphics package, or in a plainTeX document via epsf.tex, and then
 converted to PostScript with dvips (or other dvi-to-ps converter), the text in
 the plot will usually be handled correctly.  However, the text may not appear
 if you send the Metapost output as-is to a PostScript interpreter.


Metapost Instructions

automatically generated by info2www version 1.2.2.9