The pl program


Welcome     Gallery     Handbook


Manual page for The(pl)

pl

SYNOPSIS

pl [scriptfile] [options] [var=value pairs]

DESCRIPTION

pl is a program that produces plots and charts. pl interprets the scriptfile to create data plots and graphs in PostScript, EPS, PNG, GIF, or X11 format.

For plots based on a table/list model, use pltab

EXAMPLES

A large number of examples are provided in the ploticus gallery



COMMAND LINE OPTIONS

The pl command line arguments may be given in any order.

-png

Produce PNG image file(s). See web for more info.

-gif

Produce psuedo-GIF image file(s). See web for more info.

-eps

Produce EPS (Encapsulated PostScript) file(s).

-ps

Produce paginated PostScript. By default, the PostScript code is written to standard output where it may be piped to your print spooler or saved in a file.

-bwps

Same as -ps but with all color references converted to monochrome.

-x11

Display results interactively on an X11 workstation or X terminal.

-cm

Use centimeters as absolute units. On the command line this must appear to the left of any arguments containing absolute unit values, such as -pagesize. If cm will always be the desired absolute units, the preferred way to achieve this is by using units: cm in a ploticus config file.

-inches

Use inches as absolute units. This is the default.

-pagesize width,height

Control the size of the display window or image. width and height are in absolute units. Absolute location 0,0 is at the lower left corner.

This option may be used to control the size of the X11 display window result. The default size is 8 inches wide by 8 inches high. The resulting size is not influenced by the -scale option.

The size of PNG/GIF result images will be determined by the extent of the graphic; however, -pagesize (or the proc page pagesize attribute) must be used for PNG/GIF images that draw beyond (8.0,8.0) absolute (inch) coordinate, in order to allocate enough image memory (otherwise the top or right areas of the graphic will not be visible).

-pagesize has no effect with EPS or paginated PostScript results (the PostScript BoundingBox will be determined by the extent of the graphic).

Example: -pagesize 7,3

-winloc x,y

Control where on the screen the upper-left corner of the X11 display window will be placed. x and y are in pixels. Example: -winloc 200 0

-stdin

Read script file from the standard input.

-o outfile | stdout

Specify a filename where the result will be written. No processing is applied to this name. If -o stdout is used, result will be sent to standard output. See also OUTPUT FILE NAMES below.

-v command
-viewer command

After generating results in the specified format, execute command in order to view the results on your screen. The output file will automatically be included in the command. For example, if a GIF file is being generated you might use this to invoke the xv utility: -viewer xv. If PostScript is being generated you could use something like this to invoke the ghostview utility: -viewer "gv -magstep -1". The given command must be available on your system and locatable in your command search path. This option may not be used with -o stdout.

-scale sx[,sy]

Scale the final result. If one value is given, the result is scaled by this amount in both x and y. If two values are given, scaling in x and scaling in y may be done independently. A scale value of less than 1.0 reduces the size; an scale value of greater than 1.0 enlarges. Scaling is done relative to the origin (0,0) which is at the lower left.

-posteroffset x,y

Allows production of large-size posters made up of multiple standard sheets of paper butted together. May be used only with paginated PostScript, and should be used in combination with the -scale and -textsize options. x,y is the point within your result (in absolute units ) that is to be placed at the lower left corner of the page. For further discussion of this, see posters .

-landscape

For paginated postscript, set paper orientation to landscape (oblong).

-portrait

For paginated postscript, set paper orientation to portrait.

-tightcrop

For PNG, GIF or EPS output, crop the result tightly to the extent of the design. Normally a small margin is allowed on all four sides. This option sometimes crops a bit too tight; if so try -croprel.

-crop x1,y1,x2,y2

Crop PNG, GIF or EPS result to the box specified by x1,y1 and x2,y2, in absolute units. Note that there may be no spaces in the coordinates specification. Cropping takes place after design is rendered and does not affect coordinate locations.

-croprel left,bottom,right,top

Crop PNG, GIF or EPS result tightly to the extent of the design (like -tightcrop), but then adjust the cropping outward or inward on one or more sides. left is the amount to adjust the left side, in absolute units. Similarly for bottom, right, and top. Positive values always adjust outward from center; negative values adjust inward (tighter). There may be no spaces in the left,bottom,right,top specification. Cropping takes place after design is rendered and does not affect coordinate locations.

-font font

sets the overall default font to font. This PostScript font will be used as the base font for the chart when rendering in Postscript (default is /Helvetica). Usually these fonts are available: /Helvetica /Helvica-Oblique /Helvetica-Bold /Helvetica-BoldOblique /Times-Roman /Times-Bold

-textsize pointsize

sets the overall default textsize to pointsize. All embedded size specifications will be rendered relative to this.

-linewidth w

sets the overall default linewidth to w. All embedded line width specifications will be rendered relative to this. See linedetails(pli) for more on line width.

-color color

sets the overall default text and line drawing color to color.

-backcolor color

sets the background color to color.

-id

Display an identifier in the lower-left corner of full page output that shows user name, current directory, input script/table file, date, and time. Currently available on Solaris 2.x only.

-noid

Suppress the identifier in the lower-left corner of full page.

-debug

Debug mode; extra dianostic information produced and temporary files not cleaned up upon termination.

-showbad

Identify unplottable data, showing the value, and its row and field.

-diagfile filename | stderr | stdout

All non-error messages and output will be written to this file (default is stderr).

-errfile filename | stderr | stdout

All error messages will be written to this file (default is stderr).

-help or -? or -version

Print version number, copyright info, web site address, etc.

var=value pairs

Any argument on the command line that contains an embedded equals-sign (=) is taken as a var-value pair. A var-value pair declares the named variable and sets it to the given value. The variable may then be used within the script file. For example: CUTDATE=10-31-98 would declare the variable CUTDATE and set it to 10-31-98. Variable names are case-sensitive.

OUTPUT FILE NAMES

The output file may be specified on the command line using the -o option, or via Proc Page's outfilename attribute. If so, the Postscript, PNG, or GIF result is written to a file of that name. -o stdout may also be used to send result to standard output.

Otherwise the output file name depends on the type of output being generated. If it is paginated Postscript then it is written to standard output, for convenient piping to your print spooler. For PNG, GIF and EPS: if the ploticus script file ends in .p, .pl, .pls, .htm or .html, the base part of the script file name is used and .png, .gif or .eps is appended. For other script file names the names out.png, out.gif or out.eps will be used.

X11 output is always displayed on the screen.

If page breaks (Proc Page) are encountered when rendering PNG, GIF or EPS, special action is necessary, since each page must go into a separate file. A Proc Page outfilename should be specified for each page; otherwise a pn prefix will be attached to the beginning of each page's output file name to indicate page n.

USAGE EXAMPLES

Suppose you have a script file called lineplot1.p. You can view the graph using pl in one of the forms below:

pl -x lineplot1.p = view on X11 screen

pl -png lineplot1.p = create PNG image lineplot1.png

pl -gif lineplot1.p -o stdout = create GIF image on standard output

pl -gif lineplot1.p -viewer xv = produce GIF and view using xv (assuming xv image viewer is available on your system).

pl -eps lineplot1.p = produce EPS file lineplot1.eps

pl -eps lineplot1.p -viewer gv = produce EPS and view using gv (that's ghostview, assuming it is available on your system).

pl -eps lineplot1.p -o lineplot.eps = produce EPS into file lineplot.eps

pl -ps lineplot1.p | lp = produce paginated postscript and send to unix lp print spooler.

pl -ps lineplot1.p -veiwer gv = produce paginated postscript and view using ghostview.

ENVIRONMENT

PLOTICUS_CONFIG

The name of a ploticus configuation file, for setting default date notations, number notations, measurement units, etc. See config for details.

LC_CTYPE, LC_COLLATE, LANG

Locale support. Thanks to Oleg Bartunov oleg@sai.msu.su for contributing this. pl and pltab must be built with -DLOCALE for this to work.

AUTHOR

Stephen C. Grubb

SEE ALSO

ploticus(1), www.sgpr.net


data display engine  
Copyright Steve Grubb


Markup created by unroff 1.0,    June 18, 2001.