|
AVAILABLE PREFABS
WHAT ARE PREFABS?Prefabs are the easiest way to get started with ploticus. You can quickly generate common types of plots without coding any ploticus scripts. Just supply several key parameters on the command line or in the data file. Everything else uses defaults.The -prefab command line option tells pl to use a prefab. Any of the other command options may also be used along with -prefab. For example, to use the scat scatterplot prefab you might use a command such as this:
Prefab scripts are ordinary ploticus scripts. A collection of prefab scripts
are included with ploticus in the ./prefabs directory.
You can use this directory or set up one of your own.
An environment variable called PLOTICUS_PREFABS must exist and
contain the full path name of the directory where prefab scripts reside.
PARAMETERS Some parameters are standard (recognized by most of the prefabs); others are specific to the individual prefabs. Parameters may be supplied on the pl command line as var=value pairs as seen in the above example. Most parameters may also be embedded in an input data file, using the #set construct:
Some parameters cannot be set from within the data file because they control
data scanning. These are data, delim, header, and comment.
There may be others as noted for individual prefabs.
OUTPUT FILE NAMES
The -o option may be used to specify output file name explicitly.
If -o is not given,
output file naming is similar to that of pl in other contexts.
For the above example the output file would be named scat.png .
CUSTOMIZATION Prefabs allow quick looks at data, but there are often details that would be nice to control but can't be adjusted because there is no command line parameter to do so. One way to proceed is to copy a prefab script to your own directory and then modify your copy as needed. Another option is to make a new prefab variant in the prefabs directory. EXAMPLES
A number of examples are included for each prefab.
The command that was used to produce each one is shown (the
command line options -gif -scale 0.7 -tightcrop were also used
but are omitted for brevity).
All of the examples may be demonstrated by going to the
prefabs directory (the command echo $PLOTICUS_PREFABS will show
the name of that directory), and entering the given command.
HINTS The following pl command line options may be very useful with prefabs: -scale, -color, -backcolor, -tightcrop, and perhaps -font. Be careful not to confuse prefab parameters with pl command line options . Prefab parameters are given this way: paramname=value. Command line options are given this way: -option or -option value. Most shells allow a backslash (\) for breaking up long commands into two or more lines. You can get a multi line title by splitting it over two lines, eg: pl -prefab pie1 data=data1 fld=3 label=1 title="Travel expenditures By department Fiscal year 2000" |
STANDARD PARAMETERS FOR PREFABSThe following parameters are accepted by all prefabs unless otherwise stated. The data parameter is always required.data
x
y
err
title
xlbl
xrange
xinc
xlog
xgrid
ylbl
yrange
yinc
ylog
ygrid
autow
stubvert
delim
header
comment
select
include1
include2
USER-CONTRIBUTED PREFABSUser-contributed prefabs are welcome and may be sent to steve@sgpr.net; please include the prefab script file and a man page giving at least one working example. |
![]() data display engine Copyright Steve Grubb ![]() |