.TH PLOTxD 1 "14 June 1995" "Graphics" "Utilities" .SH NAME plot2d, plot3d \- make 2-D or 3-D plots from text files of data, using \fIgnuplot\fR .SH SYNOPSIS \fBplot2d\fR [ \fIinput-file\fR ] [ [ \fIxcol\fR ] \fIycol\fR ] [ \fIoptions ...\fR ] .br \fBplot3d\fR [ \fIinput-file\fR ] [ [ \fIxcol ycol\fR ] \fIzcol\fR ] [ \fIoptions ...\fR ] .SH DESCRIPTION .PP These UNIX shell scripts can be used to produce simple 2-D and 3-D plots using \fIgnuplot\fR(1) in batch (non-interactive) mode. \fIplot2d\fR was designed as a portable, quick-and-dirty replacement for Paul Albrecht's elegant but unsupported \fIplt\fR; \fIplot2d\fR accepts a few of the most commonly-used \fIplt\fR options and produces similar plots. \fIplot3d\fR uses the same syntax as \fIplot2d\fR, but it produces simple 3-D plots (a capability not offered by \fIplt\fR). .PP The \fIinput-file\fR should contain one or more space- or tab-separated columns of data per line, with each point on a line. Omit the \fIinput-file\fR argument to read data from the standard input. (Note: since \fIgnuplot\fR cannot read data from a pipe, \fIplot2d\fR and \fIplot3d\fR save piped input in a temporary file before invoking \fIgnuplot\fR.) .PP \fIxcol\fR, \fIycol\fR, and \fIzcol\fR specify the column numbers within the input file for the x, y, and z coordinates of the points to be plotted. The leftmost column is column 0 (this convention follows that used by \fIplt\fR, rather than that used by \fIgnuplot\fR). Omit the \fIxcol\fR argument to \fIplot2d\fR to use row numbers as abscissas; if \fIycol\fR is also omitted, \fIplot2d\fR plots column 1 vs. column 0. When using \fIplot3d\fR, omit both \fIxcol\fR and \fIycol\fR to generate x and y coordinates sequentially based on row numbers; a blank line in the input resets x and increments y in this case. .PP \fIOptions\fR include: .TP \fB-h\fR Print help and exit (no plot is made). .TP \fB-t \fItitle\fR Use \fItitle\fR as the title for the plot. .TP \fB-x \fIlabel\fR Use \fIlabel\fR as the X-axis label. .TP \fB-y \fIlabel\fR Use \fIlabel\fR as the Y-axis label. .TP \fB-z \fIlabel\fR Use \fIlabel\fR as the Z-axis label (\fIplot3d\fR only). .TP \fB-X \fIxmin xmax\fR Plot x-coordinates between \fIxmin\fR and \fIxmax\fR only. .TP \fB-Y \fIymin ymax\fR Plot y-coordinates between \fIymin\fR and \fIymax\fR only. .TP \fB-Z \fIzmin zmax\fR Plot z-coordinates between \fIzmin\fR and \fIzmax\fR only (\fIplot3d\fR only). .TP \fB-T \fIprinter\fR Produce output on the specified PostScript \fIprinter\fR (default: plot on-screen). Use \fB-T eps\fR to generate encapsulated PostScript on the standard output. .SH EXAMPLES .PP Create a text file with the following contents: .br 0 0 0 .br 1 1 1 .br 2 4 8 .br 3 9 27 .br 4 16 64 .br and call the file \fIpowers\fR. Plot the first column vs. the second by: .br \fBplot2d powers 0 1 -t "Squares of small integers" -x "Integer" -y "Square"\fR .br The same file can be used to generate a number of different plots, by choosing different columns. To plot the third column vs. the first, try: \fBplot2d powers 2 0 -t "Marshmallows" -x "Mass (kg)" -y "Height (m)"\fR .SH SEE ALSO \fIgnuplot\fR(1) .br \fIgnuplot\fR is freely available in C source form by anonymous FTP from \fIprep.ai.mit.edu\fR and many other sites. .SH AVAILABILITY This program is included in version 9.3 and later versions of the DB Software Package.