Using Gpl

Gpl is a simple shell script designed to give the user access to a limited number of gnuplot commands, in order to make quick and easy plots. It is designed to be used at the end of a pipeline, and all options are specified on the command line. Its user interface is modeled on the older plot_data, whose syntax was in turn modeled on older programs such as mcdraw and mongo.

Typically, gpl is used as follows.

	program | gpl <gpl-options>
(If PostScript output is chosen, the output from gpl should then be redirected to a file.)

Gpl's command-line options are (from experience) the smallest set of graphics operations needed to produce useful results. They may be listed by typing

	gpl --help
which prints:
gpl:      minimal subset of gnuplot commands, with data from stdin

Options:  -c i j k...     columns to plot (x y1 y2...)       [1 2]
          -h header       specify an overall header         [none]
          -l x1 x2 y1 y2  specify plot limits          [automatic]
          -L size         specify plot limits (+/- L)  [automatic]
          -p              toggle points/lines             [points]
          -P              toggle PostScript output           [off]
          -s script       save the script in the named file   [no]
          -x              specify x-label                   [none]
          -y              specify y-label                   [none]
          -Y a b ...      specify plot labels    ["column j", ...]
Defaults are given in square brackets.

Thus, for example, to plot columns 2 and 4 (as y) of the input stream against column 3 (as x), label the axes, add a header, and save the results in a PostScript file, type

    program | gpl -c 3 2 4 -x time -y data -h Fig.\ 1 -P > plot.ps
To see the equivalent gnuplot script, use the "-s" option.