GENPLOT - By Michael O. Thompson (mot1@cornell.edu)
- Introduction, Invoking GENPLOT
- A. Device Control
DEVICE - Select device or send control information
CLS - Erase text screen and return cursor to home
Erase - Erase graphics screen or force a page feed
GRPRINT - Attempt to do a <PRINT SCREEN> of graph
ENCURSOR - Enable/Disable the cursor input
GRPAGE - Set graphics page on multiple page devices
SPEED - Set the drawing speed of the plotter
HCOPY - Control storing of plot vectors to a file
- B. Basic plotting
Plot - Plot the current data set
Overlay - Overlay data on current plot and axes
Npoint - Set the point plotting interval
Grid - Draw a grid on the plot
Fill - Fill a region with solid color
Autoerase - Controls automatic ERASE for PLOT command
ZOOM - Expand the plot around the given region
UNZOOM - Return to the normal plot scale
Autoids - Enables automatic IDS on each PLOT & OVERLAY
IDS - Draw legend entry with default identity string
Identify - Draw legend entry with specified text
Title - Put a title on the top of the graph
- C. Files
Read - Read a data file into curve or variable list
WRite - Write the current data to a disk file
STatus - Display information about data set
SHow - Display the current data set as x,y pairs
Archive - Save the main curve into a curve variable
RETRieve - Retrieve archived data set to main curve
- D. Linetypes Colors etc
LType - Select solid, dashed, dotted, symboled lines
SYmbol - Select symbol for plotting
SYMSize - Set the symbol size
Vecsize - Set the length of dashes in dashed lines
Pen - Set line color
Linewidth - Set the line thickness or laser printers
Visibility - Set line visiblity
- E. Axis control
Axis - Draw the axes
Autoaxis - Toggle automatic drawing of axes by PLOT
Boxmode - Toggles drawing of the top and right axes
Setup - Enter graphics setup screen for plot info
Region - Specify min/max values for each axis
Set - Specify min/max values for each axis
Force - Force GENPLOT to use your exact axis scale
Autox - Toggle auto-scaling for the X axes
Autoy - Toggle auto-scaling for the Y axes
PLX - Select axis to use for the plotted X data
PLY - Select axis to use for the plotted Y data
LABel - Set the axis label
SUBTicks - Toggle subtick mark plotting
Inticks - Toggles direction of the tick marks
XTop - Control axis labeling for the top axis
YRight - Control axis labeling for the right axis
Logarith - Use logarithmic axis
Chrset - Select the character set for labeling
Characte - Select character set for labeling (CHRSET)
AXCTRL - Modify characteristics of individual axes
- F. Size and Position
SIZe - Set the size of the plotting area
Offset - Specify offset of graph from lower left corner of page
Margin - Specify margins around axes to provide space for labels
SHRink - Reduce the size of the plot
SUB_PLOT - Establishes a region for a sub-plot within a larger plot
Flipxy - Flip the X and Y axes on the page
- G. Plot information
Cursor - Examine data point values with the cursor
STatus - Display the data set information
SHow - Display the current data set as x,y pairs
Parameter - List various plotting parameters
Parms - List various plotting parameters
- H. Data analysis
USER - Load user routine and execute subroutine USER$
SORT - Sort data by ascending/descending X
Exchange - Exchange the X and Y data points
Fix_Grid - Force the data set against a linear grid
Cull_Data - Eliminate a range of data
Edit_dat - Add or delete data points
Create - Create a data set with a function
TRANSform - Transform the data by various standard functions
LSQFit - Linear-least square fit, see FIT LINEAR
Fit - Fit the data to some analytic forms
- I. Sprucing up
ANNotate - Subprocessor for labelling plots
ANNote - Subprocessor for labelling plots (synonym)
Characters sets - Default character set definitions
Greek character - Mapping of greek characters onto English
Special symbols - Mapping of special symbols onto keyboard
Inline commands - Super/subscripts, pen & font change codes
Special characters - TeX characters specifications
C strings - Handling of escape sequences in character strings
- J. Function evaluator
EVALUATE - Evaluate a general math expression and print result
SETVAR - Allocates a real variable and set it to an expression
DEFINE - Define a user function of one or more variables
DECLARE - Define a string variable and set its value
ALLOCATE - Allocate memory for a named variable or array
Advanced - Internal structures of compound variables
DEALLOCATE - Release memory currently assigned to a variable
LISTVARS - Lists currently defined variables, function, curves etc.
SAVEVARS - Writes macro file of current variables and functions
{operations} - Allowed mathematical and relational operations
{functions} - Predefined mathematical functions and constants
{complex} - Rules and syntax for complex numbers and arithmetic
MATHMODE - Mode setting for evaluating arithmetic expressions
{limits} - Limitations to the function evaluator
- K. Macros
Xeq - Execute macro file or return from currently executing macro
CALL - Execute macro file or return from currently executing macro
BASE_Macro - Specify a default macro directory
Echo - Toggle display while a macro is running - or print text
Query - Prompt the user for input from a macro
Macro - Collect commands into a temporary macro file
SAVE_Macro - Save commands from temporary MACRO to specified file
IF - Conditionally execute the remainder of the command line
GOTO - Causes program execution to jump to the specified label
FOR %F - Repeat a command line for a specified item list
FOR REPEAT - Repeat a command line a specified number of times
&GETARG - Retrieve an argument from previous macro or from user
&QUERY - Query the user for an argument directly
&YESNO - Retrieve next YES/NO argument from the calling macro
&ENCODE - Encode real number expression into character string
CMDLIN - Expands a string into the next command
SLEEP - Sleep for given time before continuing execution
WAIT - Wait for user action before continuing
TIMER - Timer function to determine elapsed time
/* - Comment specifier. Remainder of the line is ignored
- L. Operating & File System Commands
<disk>: - Change default disk
CD - Change directory
Memory - Display free memory and disk space.
Where - Gives the pathname of the current directory.
LS - Display directory
DIR - Display directory (See LS)
Type - Type a file on the screen
DOS - Send a command to the systme to be executed
PAUSE - Temporarily pause out of GENPLOT to a new DOS shell.
- M. Miscellaneous
? - A condensed list of commands
GENPLOT - Return to GENPLOT level
Help - Display information about various commands
Reset - Reset most of the GENPLOT status parameters
Quit - Get out of GENPLOT
Return - Returns from GENPLOT to the main calling program
Sgraph - Change some of the esoteric plotting parameters
Script - Open a file in which to record comments and commands
Logit - Put a comment in the SCRIPT file.
- N. EMACS - Built-in EMACS style editor
- Appendix A: DEFINE - Define a general function or string variable
- Appendix D: Device drivers
GENPLOT is a generic plotting package that is particularly useful for
presenting and analyzing scientific research data. It provides powerful,
user friendly graphics capabilities with minimal programming effort. A user
may make X-Y graphs (no pie charts allowed - this is for scientists, not
managers), plot data and simulation curves, transform the data in various
ways, and later spruce up the plots for publication.
GENPLOT is an extremely powerful and flexible plotting package for the
analysis of scientific and engineering data. However, this flexibility comes
at the cost of complexity, and the program is optimized for power at the
expense of the novice computer user. The current expectation in software,
fostered by Macintoy and Windoze applications, is that one should be able to
sit down at a new program without reading any manual and be immediately
productive. This is not the model for GENPLOT. If simple command
line prompts bring chills and tingles to your spine, this program is probably
not for you. However, even as a novice, you can very successfully use the
program if you are willing to invest some time to read the manual, and if you
can avoid being intimidated at first by the large set of commands and
relatively long learning curve. Eventually, a subset of the commands will
become like a second language and the true power and flexibility of this
program will be made manifest.
GENPLOT has been written over a number of years at Cornell University with
input from numerous people, including Larry Doolittle, Rick Cochran and Mike
Heisler. Mike Thompson must, however unfortunately, take responsibility for
its current gross and unmanageable size.
Invoking GENPLOT
GENPLOT wakes up to the user with a blank data set of X,Y points.
Associated with this X,Y data set are two variables called NPT and NPTMAX.
NPT specifies the number of points which are currently valid in the X,Y set
while NPTMAX gives the dimensioned size of the X,Y arrays (or the initial
maximum value of NPT). This X,Y curve is referred to as the DEFAULT curve and
is used by most of the GENPLOT commands unless you specify otherwise. Other
curves may also be defined, as discussed later. By definition, a CURVE refers
to a collection of real X,Y points and an integer representing the number of
points, NPT.
The full format of the GENPLOT initialization is:
GENPLOT [-Buffer <npoints>] [-Inifile <file>] [-Quiet] [-Debug <n>] [-Help]
The initial buffer size may be modified from the default 2048 points using
the -buffer option; however, this is seldom necessary since GENPLOT
will automatically expand the curve as necessary to accomodate the data.
Likewise, an initialization file may be specified using the -ini
option; if no file is specified, the program assumes GENPLOT.INI.
The -HELP option lists out the format of the GENPLOT command and
returns immediately.
Once GENPLOT is running, commands are typed at a GENPLOT: prompt
in a pseudo English format. Commands and arguments are taken from the typed
command line sequentially. The command processor (see Appendix T) allows
multiple commands and arguments to be given on a single command line. There
is little difference to GENPLOT if commands are given entirely on a single
line or broken into multiple lines; GENPLOT will prompt in each case for the
information necessary to continue. For the first time user, it is probably
better to let GENPLOT prompt each time for the information until one learns
the order of parameters for each command. Like many computer programs, the
format of the commands is somewhat strict and arguments are usually required
in a specific order. The order of these arguments is considered ``natural''
by the author, but if in doubt the command reference and online help provide
the specific format for each command. Some commands also accept optional
arguments or modifiers which may be given in any order following all required
arguments.
Selection and control of devices
This section contains commands which select and control the graphic device.
The DEVICE command is used to select which device you want to use for graphics
output as well as to send special commands to the device driver. The command
DEVICE LIST will provide a list of the currently configured devices on your
machine. The list may be modified by editing the DEVICES.DAT file.
Details on each type of device and the physical connection to the hardware are
described in Appendix D of the manual.
- DEVICE -- Select device or send control information
Syntax: Device [? | List | <device> | AUTO | <control_option>]
The DEVICE command can either initialize a new plotting device or send device
specific control information to the currently active device. All control
options begin with a '-' character and are listed below. The command DEV LIST
will list all devices configured in the DEVICES.DAT file. Normally configured
devices are BW, EGA, VGA, COL, CGA, and HERC for screen drivers. Various
hard copy devices should also be present, such as the HP LaserJet and HP pen
plotters. To add or modify the characteristics of any device, see
APPENDIX D in the manual before editing DEVICES.DAT.
If no device is specified prior to a plot attempt, the environment variable
GTERM is queried for a default device. If set, it will be automatically
initialized. To set GTERM, include a command such as "SET GTERM=EGA" in your
AUTOEXEC.BAT file. The command DEVICE AUTO also initializes the GTERM device.
Control options:
-TEXT ==> Force text screen to be active
-GRAPH ==> Force graphics screen to be active
-NOTEXT ==> Turn off the text screen
-NOGRAPH ==> Turn off the graphics screen
-OPTION ==> Send an option string (text) to the active device
This is very device specific, see Appendix D
- CLS -- Erase text screen and return cursor to home
Syntax: CLS
Clears the text screen and returns the cursor to home position.
- Erase -- Erase graphics screen or force a page feed
Syntax: ERase
Erase the graphics screen if a device has been selected. Also resets the
HCOPY file if enabled. On non-video devices, this also does a FRAME
operation causing the plotter to be advanced to a clean page.
- GRPRINT -- Attempt to do a <PRINT SCREEN> of graph
Syntax: GRPRint
Attempts to produce a hardcopy of a video terminal graphics display.
Implemented on the PC devices and on Tektronix devices. On PC devices, the
command does a PRINT SCREEN on the graphics screen. A driver for doing
graphics PRINT SCREENS is required to avoid jibberish. See the GRAPHICS DOS
command (your manual) or try using GREPSON/GRHP programs provided in the
UTIL directory for the EGA.
- ENCURSOR -- Enable/Disable the cursor input
Syntax: ENcursor [yes | no]
Enables the cursor on your device if one exists. Generally irrelevant. Only
used in long macro files to avoid bringing up a cursor automatically. If
the cursor is not enabled, cursor requests result in an ERROR message.
- GRPAGE -- Set graphics page on multiple page devices
Syntax: GRPAge <n>
Selects a graphics video page. On fully configured EGA devices, 256K of
video memory, two screen pages are available and either may be selected. If
the device has enough memory for two pages the default is to display text on
page 0 and the graph on page 1.
- SPEED -- Set the drawing speed of the plotter
Syntax: SPeed <n>
For pen plotters with this capability this sets the pen speed.
Sometimes different pen types or paper types require a slower pen speed.
- HCOPY -- Control storing of plot vectors to a file
Syntax: HCopy [commands/options]
The HardCOPY command is used to save to disk the information of what is being
displayed on the screen. At any time, this vector file may be played back to
the screen or to another plotter, or it may be permanently saved to disk.
Saving is initiated by HCOPY ON. Playback is accomplished with
HCOPY DEV <device> (/ for the current device). To save to disk, use
HCOPY SAVE <file>.
HCOPY is primarily useful when annotating a plot with the cursor and a print
on a laser printer or HP pen plotter is desired. Limited editing
capability is provided for the HCOPY files with MARK, LABEL, BACKSPACE
and UNDO.
- On -- Start saving plot vectors in the HCOPY file.
Syntax: HCopy ON
Resumes saving the plot information to the current HCOPY file, or opens one
if no current file exists.
- Off -- Temporarily stop saving plot vectors in the HCOPY file.
Syntax: HCopy OFF
Temporarily stops saving the plot information. All current information is
kept. Use HCOPY ON to restart collection of data.
WARNING: Some operations which change while HCOPY is OFF will not be
recorded when a HCOPY ON is subsequently executed.
- End -- Stop saving plot information in an HCOPY file.
Syntax: HCopy END
Stop saving plot information and close the file. Disposition of the file
will be requested.
- Undo -- Undoes the draw operations from the last COMMAND LINE
Syntax: HCopy UNDO [-REDRAW]
The last command line which caused plotting to occur is effectively erased
from memory of the HCOPY file. The vectors are not removed from the screen
unless the entire plot is redrawn with the -REDRAW option.
The UNDO will undo ALL plotting which resulted from the last command line.
The execution of a macro would be considered one command. For example,
if the last command line was
ANNO LABEL / 'Hi there' LABEL / 'Yesterday' XEQ MORE_LABELS
both labels and the effects of the MORE_LABELS macro will be removed by UNDO.
UNDO is not guarenteed to always work. Generally, it will be successful if
the UNDO is done immediately after the vectors are drawn and no intervening
commands modify the plotting common blocks.
- Device -- Plot the current HCOPY file on the given device.
Syntax: HCopy DEVice [<dev> | /]
Causes the contents of the current HCOPY to be plotted on the specified
device. Specifying / as the <dev> will cause the file to be replotted on the
current screen. Usage is commonly that after a nice plot is obtained, the
HCOPY DEV HP7475 is executed to send the plot to the HP pen plotter.
- Save -- Save the current HCOPY file to a disk file.
Syntax: HCopy SAVe <file>
Saves the current HCOPY vector file to disk. If the HCOPY was active, a new
file is opened. Once you have a good plot, HCOPY SAVE <file> will put it
safely on disk for plotting later. If <file> is replaced with a /, HCOPY
will give the file a temporary name of the form T$0000.HCP.
- Plot -- Plot the given HCOPY file on the current device.
Syntax: HCopy PLot <file>
Causes the information in the HCOPY <file> on disk to be plotted to the
current device. Any HCOPY file currently collecting vectors is paused prior
to this PLOT. This command is most commonly done at the end of a long day to
plot a collection of HCOPY files which have accumulated to disk.
- Append -- Appends subsequent plot vectors to an existing HCOPY file.
Syntax: HCopy APpend <file name>
Opens an existing HCOPY vector file and appends subsequent plot commands to
this file. This command is almost always followed immediately by a
HCOPY DEV / command to plot the current information in the file to the
graphics screen.
- Label -- Set a named mark in an HCOPY file.
Syntax: HCopy LABel <text>
Sets a mark in the HCOPY file and labels it with the given text. The HCOPY
BACKUP command can be used at any subsequent time to rewind the file to this
point. HCOPY LIST will provide a list of all marks in the file.
HCOPY MARK or HCOPY LABEL should be executed routinely during a complex plot.
If an error is made after this point, it is a simple matter to backup to the
last good spot.
- Mark -- Set an unlabeled mark in an HCOPY file.
Syntax: HCopy MArk
Sets a mark in the Hcopy information. See LABEL sub-command. MARK is
synonymous except that no text is included with the mark in the HCOPY file.
- BACKUP -- Erase the vector commands back to the last marked point.
Syntax: HCopy BACKspace or HCopy BACKUP
Rewinds the HCOPY file to the last marked point. Any vectors drawn
since the last MARK or LABEL command will be removed from the file.
The mark itself is not lost unless another BACKUP or BACKSPACE is
issued before another vector is drawn. See LIST to obtain a listing
of the current marks in the file.
Use HC DEV / to see what the result is.
- Backspace -- Same as BACKUP
Syntax: HCopy BACKspace or HCopy BACKUP
See BACKUP
- List -- List the marks in the current HCOPY file.
Syntax: HCopy LIST
Shows a list of the current marks in the HCOPY file.
- Help -- Display the HCOPY commands.
Syntax: HCopy HELP
Displays the Hcopy commands.
- Reset -- Clear the current HCOPY file.
Syntax: HCopy RESet
Clears all vectors in the current HCOPY file and resets the file to 0. This
is automatically done with each ERASE command.
- Status -- Display HCOPY status.
Syntax: HCopy STATus
Gives the HCOPY status. Displays things like marks and the file name.
- Pause -- Stop saving plot information. Synonymous with END.
Syntax: HCopy PAuse
Stop saving the plot information. Synonymous with END.
Basic commands for plotting
This section contains the basic commands for plotting and overlaying data
sets. PLOT, OVERLAY and AXIS are the most basic commands for generating
plots once a device is selected. Using options in PLOT, function and curves
and be drawn as well. Other commands control the automatic operation of
these commands.
- Plot -- Plot the current data set
PLot [options]
Plots the current data set with the specified options. Formally, PLOT is
equivalent to AXIS OVERLAY. The screen is usually erased and a complete plot
is done. Options set below may override any of the parameters set by GENPLOT
commands. If the main curve is plotted, the string PLOT:OPTS will also be
parsed for options also although command line options take precedence. If an
archived <curve> is specified, options are taken from <curve>:OPTS. For a
function plot, options are taken from FUNCTION:OPTS.
Plot [ [-CURVE] <curve> | {-Function <fnc> | -FIT} [-fnc_options] ]
[-Bargraph | -Histogram | -PT_label]
[-SYMbol <n>] [-LType <n>] [-PEN <n>] [-LINEwidth <lw>] [-SYMSize <sz>]
[-IDS | -IDENTIFY <text>] [-L&S] [-EXCLUDE { <archive> | -SELF } ]
[-ERRX <exp>] [-ERRXL <exp>] [-ERRXH <exp>] [-ERRWIDTH <x> <y>]
[-ERRY <exp>] [-ERRYL <exp>] [-ERRYH <exp>]
If AUTOAXIS is turned off, this command is identical to OVERLAY.
If AUTOERASE is turned off, screen is not erased prior to the drawing axis.
- <curve>
Plot the data from the archived <curve> instead of main curve
Syntax: PLOT <curve>
Normally, PLOT and OVERLAY display the main curve data. However, the token
immediately following a PLOT or OVERLAY command is always compared to the list
of archived curves. If it matches an archived curve, the data from that
curve is plotted instead. The plot options and identifier string corespond to
the archived curve as well. See the ARCHIVE command.
- -Function and -FIT
Plot a function instead of data
Syntax: -Function <fnc> [-From xl] [-To xh] [-Range xl xh] [-Points n|-By dx]
-FIT [-From xl] [-To xh] [-Range xl xh] [-Points n|-By dx]
The specified function <fnc> is expanded into a temporary curve over the
specified range and plotted. The options and function correspond to
definitions in the CREATE command. The IDS string is set to the specified
function and additional options for the plot are taken from the string
variable FUNCTION:OPTS. See the CREATE command for further details on
specifying the range and function.
The -FIT option is equivalent to the option -FUNCTION FIT(X).
- -Bargraph
Plot as a bargraph
Syntax: -Bargraph
Plot the data as a bargraph. Each point is drawn as a rectangle from the
X axis to the Y value to be drawn as a rectangle, with the sides of the
retangles centered between X values. The data is not sorted by this command
and hence we strongly suggest the use of SORT before using this option (unless
you like strange plots).
- -Histogram
Plot as a histogram
Syntax: -Histogram
Plot the data as a histogram. Almost the same as the BARGRAPH mode except
that the vertical line segments do not extend down to the axis. Histogram
data can be generated from a data set using the command TRANSFORM Y BIN <dx>
- -PT_label
Draw the data as a number at each point
Syntax: -PT_label
The data is plotted with the number corresponding the position of the point
in the data set. For point 1, a 1 is drawn centered at the point where the
data point would lie. The curve cannot consist of more than 9999 points
(which would be unbelievely slow and unreadable anyway).
- -Symbol
Specify the symbol type to be used for this overlay
Syntax: -SYMbol <n>
Overrides the symbol number to be used on the overlay. It is not necessary
at this level to also set -LT 0, it will be done automatically. However,
you may specify -LT n after the -SYM setting to get lines and symbols L&S.
The setting of SYMBOL within the main program remains unchanged. See the
symbol command for more information about available symbols.
- -Ltype
Specify the line type to be used for this overlay
Syntax: -LType <n>
Sets the line type for this overlay. See the LTYPE command for more
information about the types available. This option will not change the line
type at the main program level.
- -L&S
Draw a line and symbols
Syntax: -L&S
Draws a symbol at each point using the current SYMBOL then connects them
with a line using the current LTYPE. The line DOES NOT ago through the
symbols. 'plot -l&s' is almost equivalent to:
plot -lt 0 ov -lt 1 -exclude plot
- -Pen
Specify the pen color to be used for this overlay
Syntax: -PEN <n> Synonym: -COLOR <n>
Selects the screen color or pen for drawing of the data set. The axis color
is not affected by this command. Use of this option will also not change the
setting within the main program.
- -LINEwidth
Specify the line width to be used for data on this overlay
Syntax: -LINEwidth <lw> Synonym: -LW <lw>
This options sets a temporary line width to be used for the current overlay
only. The line width is specified in units of 0.007 inches, but need not be
an integer. The axis line widths are not affected by this option nor is the
setting in the main module changed. See the LINEWIDTH command for additional
details.
- -SYMSize
Specify the symbol size to be used for this overlay
Syntax: -SYMSize <size>
This options sets a temporary symbol size to be used for drawing data as
symbols (or -PT_SYMBOLS). The size is specified in inches. The setting of
symbol size in the main module is unchanged by this option. See the SYMSIZE
command for additional details.
- -IDS and -IDENTIFY
Identify the curve in the LEGEND when drawn
Syntax: -IDS or -IDENTIFY <text>
The options -IDS and -IDENTIFY cause the current curve to be identified in
the legend by symbol or line type followed by a descriptive text. For -IDS,
the text is the default IDS of the curve. With -IDENTIFY, the text
immediately follows the option and should be enclosed in quotes. See the
IDS and IDENTIFY commands for additional information. This option format
for IDS and IDENTIFY should be used if either -SYM or -LTYPE is overridden.
Examples: PLOT -LT 1 -IDS
OVERLAY C2 -SYM 7 -identify 'Modified fit'
- -EXCLUDE
Overlay the data excluding area used by points
Syntax: -EXCLUDE {-SELF | <curve>}
The -EXCLUDE option causes prevents vectors drawn in this data set from
extending into the space occupied by symbols drawn by a previous OVERLAY or
PLOT. It is a ``final touch feature'' which is used to prevent solid lines
from drawing through the open symbols of actual data (as when overlaying a
fit on top of data).
An exclusionary circle (diameter defined by current symbol size) is drawn
around each point in the specified curve. If -SELF is specified, the
exclusionary curve begins empty and is appended as each point is drawn (so
a data point doesn't exclude itself). The exclusion feature is exact for
the circle symbols drawn at the same symbol size. Non-overlapping circles
can be drawn with the -SELF option. For other symbol types, the exclusion
works to the degree the symbol can be approximated as a circle (as physicists
love doing).
Example: PLOT C1 -SYM 1 OV -F FIT(X) -LT 1 -EXCLUDE C1
PLOT C1 -EXCLUDE SELF
WARNINGS: The -SELF option only works for the main curve. Specifying a curve,
-FIT or -FUNCTION will cause -SELF to fail.
- -ERRX etc. (Error bars)
Draw error bars
Syntax: [-ERRX <exp>] [-ERRXL <exp>] [-ERRXH <exp>] [-ERRWIDTH <x> <y>]
[-ERRY <exp>] [-ERRYL <exp>] [-ERRYH <exp>]
[-ERRWIDTH <x> <y>]
The error bar options specify the magnitude and size of error bars in each of
the directions on the plot. Independent error bar expressions may be
specified for plus and minus on X and Y. The -ERRX and -ERRY options cause
the corresponding expression to be used for both the plus and minus error
of the corresponding error. -ERRXL sets the lower (minus) error bar in X
and -ERRXH set the high (plus) error bar. If an expression is not set, it
defaults to zero and is not drawn.
The option -ERRWIDTH is sticky (ie. needs only be set once in a session) and
determines the size of the cross bar at the end of each error bar. The X
specifies the Y size (in inches) of the cross bar for X error bars. A size
of zero gives a line for error bars only.
The expressions for each error bar may be arbitrarily complex but are more
commonly either a simple expression (or constant like 0.37) or the elements
of a error bar curve (ERROR:X).
Example: DEFINE C1:OPTS = '-ERRX ERROR:X -ERRYL ERROR:Y -ERRYH SQRT(ERROR:Y)'
PLOT C1
- Overlay -- Overlay data on current plot and axes
OVerlay [options]
This command is used to plot more than one curve on the same graph. The
given data is plotted over, it overlays, the current graph. It does not
erase the current graph, but uses the same axes and labeling. If no data
information is given the current data will be plotted. This can be used in
conjunction with LTYPE to plot a line and symbols. You can also specify an
archived data set or an expression. See the options below for more
information.
The full syntax is:
OVerlay [ [-CURVE] <curve> | {-Function <fnc> | -FIT} [-fnc_options] ]
[-Bargraph | -Histogram | -PT_label]
[-SYMbol <n>] [-LType <n>] [-PEN <n>] [-LINEWIDTH <lw>] [-SYMSize <sz>]
[-EXCLUDE { <archive> | -SELF } ]
[-IDS | -IDENTIFY <text>] [-L&S]
[-ERRX <exp>] [-ERRXL <exp>] [-ERRXH <exp>] [-ERRWIDTH <x> <y>]
[-ERRY <exp>] [-ERRYL <exp>] [-ERRYH <exp>]
See the PLOT command for a full description of the options. All options act
identically between the PLOT and OVERLAY commands.
- Npoint -- Set the point plotting interval
NPOINT <n>
Determines which of the data points are plotted. NPOINT 1 plots every point,
NPOINT 2 plots every other point.
- Grid -- Draw a grid on the plot
GRID [-PEN n | -COLor n] [-LType n] [-VECsize x]
Normally, only the outside of an axis is draw with major and minor tick marks.
Occassionly, it is convenient to have grid markings over the entire plotting
area. The GRID command causes lines to be draw across the plot at every major
tick mark, much like graph paper. The major tick correspond to the current
axes against which X and Y are plotted (see PLX and PLY commands in
Controlling Axes and Plot Ranges).
The type and color of the GRID may be controlled with the switches. The
settings of these switches are sticky, i.e. they retain their new value from
one execution of the GRID command to the next.
-PEN <n> Selects pen <n> to be used for subsequent grids
-COLOR <n> Synonymous with -PEN above
-LTYPE <n> Sets line type for GRID. Default is type 4 (dots).
See the LTYPE command for examples of line types
-VECSIZE <x> Sets the basic vector size for LTYPE's other than 1. Default
is 0.01 inches. Smaller numbers give dots closer together.
Example: GRID -pen 2 -ltype 1 Draws grid with pen 2 and solid lines
GRID Draws grid with previously set values
- Fill -- Fill a region with solid color
FILL [x1 x2 | /]
Fills a region. The region is specified by giving an (x,y) coordinate or by
using the cursor (/ mode) to select a point witin the area to be filled. The
area will be filled with the current color up to the first border found of
the same color. Be careful, if the region does not have a complete border of
the current color, FILL will leak out and fill your entire plot.
- Autoerase -- Controls automatic ERASE for PLOT command
AUTOEras {ON | OFF}
Toggles automatically erasing previous graph with a subsequent PLOT command.
Default is AUTOEr ON. Turn this OFF to create several graphs on the same
page.
- ZOOM -- Expand the plot around the given region
ZOOM
The zoom command causes a region of the plot screen to be expanded to fill
the entire plot area. The scales for the X and Y axis are modified so as to
match the area selected selected by a cursor. A new axis is drawn and the
current data set is overlayed using current LTYPE, SYMBOL and PEN setting.
1) If first zoom, save current plot regions
2) Obtain (xlow,ylow) (xhigh,yhigh) from the cursor
3) REGION BOT xlow xhigh REGION LEFT ylow yhigh OVERLAY
The first time ZOOM is executed (since the last UNZOOM), the current scales
will be saved. The original sized plot can be retrieved using UNZOOM.
Multiple ZOOMS are possible; UNZOOM returns to the original screen.
The region is selected with the cursor in BOX mode. The cursor is attached
to one corner of the box. Depending on mode, the cursor keys move either the
entire box or just the attached corner.
<DEL> toggles between rigidly moving the box and moving only one corner
<SPACE> switches from one corner to the diagonally opposite corner
<SHIFT> momentarily switches the cursor speed as long as held down
<INS> toggles the speed of cursor movement
<CR> returns the coordinates.
Note that this is not a true zoom. Only data in the current set is zoomed.
- UNZOOM -- Return to the normal plot scale
UNZOOM
This is the undo of the ZOOM command. The first ZOOM to be executed causes
the settings of the regions to be saved. UNZOOM restores these settings and
does an AXIS OVERLAY command. If any regions have been changed by the user
since the ZOOM command, they will be lost when UNZOOM is executed. Only data
in the current data set is replotted with the UNZOOM command. Subsequent
UNZOOM commands have no effect until a new ZOOM command is executed.
See also: ZOOM
- Autoids -- Enables automatic IDS on each PLOT & OVERLAY
AUTOIDS {ON | OFf}
Automatically places a file ID in upper left hand corner of plot. Default is
AUTOID OFF. Also see the IDS command.
- IDS -- Draw legend entry with default identity string
IDS [ [-CURVE] <curve>]
Does an IDENTIFY using the text of the default identify string for the main
data set. The default string is set equal to the filename by any READ
command, to the function in a CREATE command, or may be explicitely set
using a "LET IDS = <text>" command. The current line type or symbol type is
drawn in the legend table followed by current IDS text.
See also IDENTIFY.
- Identify -- Draw legend entry with specified text
IDENTify <text>
An example section of the current line type or symbol type will be plotted
with the <text> adjacent to it. By default, this curve identification occurs
at the upper left corner of the plot. See SGRAPH to move the default position
for IDENTIFY text. This provides a legend for the plot.
For example: +++ old.data
--- new.data
See also IDS
- Title -- Put a title on the top of the graph
TITle <text>
Puts a title on the graph. Works only if the TOP axis has not been enabled. A
better way to title a graph is to use ANNOTE LABEL command. This command is
primarily for automatic macros which create lots of similar plots.
Commands to read, write and display data files
GENPLOT internally supports both ASCII unformatted data files and a special
BINARY data format. Data may exists in multiple columns and may include
expressions as well as numbers. ASCII refers to a character based format
(i.e. human readable) and not to a particular structure. See examples under
READ.
In general, the BINARY format is preferrable for large data sets which are
read frequently. BINARY is substantially (factors of 10-100 times) faster
than ASCII but is limited in the structure. ASCII is flexible at the expense
of reading speed. Direct write of BINARY files from other programs is
possible; see the information provided in the manual under data formats. A
useful alternative is to let GENPLOT read the data as ASCII and then WRITE it
out as BINARY.
- Read -- Read a data file into curve or variable list
REad [-CURVE <cv>] <file> [-APpend] [-Binary|-AScii][-COL <n><n>] [-LIST <..>]
Reads a data file, composed of ordered pairs on succesive lines. There must
be one pair per line. You may choose to separate the coordinates by a
comma, space, or tab. You may also put more than one column of numbers in
your data file, for example, data from a spreadsheet. If you wished to plot
the fourth column of numbers (y variable) against the second column of
numbers (x variable), then read only these columns by typing READ filename
-COLUMNS 2 4. The default is to read only the first two columns.
See the -LIST sub-option for information on reading multiple columns of a
data file into variables other than the default X and Y.
- Format
Format of ASCII data file
The format of the data file in ASCII mode is almost completely free. Points
may consist of numeric data, or arithmetic expressions. Columns which are
not read with the -COLUMN command need not even be numbers (i.e. text).
3.4, 5
10 6.555 Some text that won't be read
2*3.4 1.5E2
- -LIST
Read an arbitrary number of columns
Syntax: -LIST var1 column1 var2 column2 var3 column 3 /
Allows reading from a data file of an arbitrary number of columns into an
arbitrary set of arrays. VAR1-VAR3 must have previously been defined by a
SETV command (or the default X,Y).
- WRite -- Write the current data to a disk file
WRITE [-CURVE <curve>] <file name> [-Binary | -Ascii]
Writes the current data set to disk. The default mode is packed binary
format, which other software programs may not be able to use, but which is
compact in size and fast to read later. You can write an ascii x,y type file
by using the -Ascii option. There is currently no way to write more than a
single X,Y data set to disk.
- STatus -- Display information about data set
STATUS [ [-CURVE] <curve>]
Displays status of a data set, including the number of points and the x and y
minimum and maximum values. This is displayed when a data file is read.
- SHow -- Display the current data set as x,y pairs
SHOW [ [-CURVE] <curve>] <low x> <high x>
Displays the current data set as a list of x,y pairs between the given X
values
- Archive -- Save the main curve into a curve variable
ARCHive <curve_name>
Store the current data set under a name that can be recalled with the
RETRIEVE command or plotted directly using it's name. This DOES NOT
save the data in a file. When you leave GENPLOT it disappears.
- RETRieve -- Retrieve archived data set to main curve
RETRieve <curve_name> [-APPEND]
Copies the archived data set <name> to the current data set. The current
data is erased. ARCHIVE the data if you want to keep it around during
the GENPLOT session. The -APPEND option causes specified curve to be appended
to the end of the main curve.
Change the plot line type, color, symbols, etc.
When plotting simple data, either symbols or lines may be chosen to represent
the data points. There are currently 7 line types, 13 symbols and numerous
colors available to highlight specific data. These commands select the pen
color, symbol type or line type. Additional commands control the width of
lines drawn (LINESTYLE), the repeat length of dotted lines (VECSIZE) and the
visibility of lines.
- LType -- Select solid, dashed, dotted, symboled lines
Syntax: LTYPE <n>
The LTYPE and SYMBOL commands work together to select either lines or symbols
to connect data on a plot. If LTYPE is 0, SYMBOL is active and centered
symbols are drawn. Otherwise, LTYPE sets the line type to <n> as shown below.
0 Symbols
1 ----------- Solid
2 - - - - - - Dashes
3 _._._._._._. Dash-Dot
4 ............ Dot
5 _ _._ _._ _._ _._ _. Dash-Dash-Dot
6 .._.._.._.._.._ Dash-Dot-Dot
7 .. _ .. _ .. _ variable dash length
If LTYPE is negative, the current line type is taken as the absolute value.
However, each time a line is drawn, LTYPE is incremented to the next value
automatically. This mode allows multiple OVERLAY commands to be distinguished
easily. The default setting is for symbols, LTYPE 0.
Example: LTYPE 2 Selects dashed lines for all subsequent curves
LTYPE -1 Selects solid for this curve with autochange
See also: SYMBOL, VECSIZE
- SYmbol -- Select symbol for plotting
Syntax: SYMbol <n>
The LTYPE and SYMBOL commands work together to select either lines or symbols
to connect data on a plot. SYMBOL is active and symbols may be drawn ONLY IF
LTYPE is set to 0. SYMBOL sets the current symbol to <n> as shown below.
0 dot (single point) 7 filled box 14 star of David
1 circle 8 filled circle
2 triangle 9 filled triangle
3 plus 10 filled triangle (point left)
4 x 11 *
5 diamond 12 filled triangle (point right)
6 star 13 filled star
If <n> is given as negative current symbol will be set to the absolute
value of <n>. After a curve is drawn with the symbol, the symbol number will
be automatically incremented to the next valid value. This allows for
automatic changing of symbol types with multiple OVERLAY commands.
Exampe: SYMBOL 3 Select triangle symbol (assuming LTYPE is 0)
LTYPE 0 SYMBOL -5 Select diamond and change symbol for each curve
See also: LTYPE, SYMSIZE
- SYMSize -- Set the symbol size
Syntax: SYMSize <r>
Sets the size (in inches) of the symbols plotted for data. The default size
is 0.15 inches. On a normal 8.5x11 plot, symsize of 0.25 is usually a better
value if only a few data points are plotted. The solid symbols (7-13)
require slightly larger symbol sizes for legibility, commonly 0.25-0.30.
Extremely large symbols are also required if you want to put the point number
within a circle to identify particular points.
Examples: SYMSIZE 0.23 Reasonable symbol size for small data sets
SYMSIZ 0.50 OV -SYM 1 These two lines give point numbers inside
SYMSIZ 0.18 OV -PT_LABEL a circle to identify the points
- Vecsize -- Set the length of dashes in dashed lines
Syntax: VEcsize <r>
This command sets the value of the VECSIZE variable, and works in conjuction
with drawing of non-solid lines (see the LTYPE command). The parameter <x>
is the minimum size in inches for dashed-dotted lines. When drawing dashed
segments for a line, the size and spacing of the dashes is determined by the
setting of VECSIZE. Doubling VECSIZE doubles both the length and spacing of
the dashes in a non-solid line. This setting VECSIZE affects all non-solid
lines including those drawn by ANNOTE.
Default VECSIZE is 0.003 inches. Reasonable values lie within [0.001, 0.01]
Example: VECSIZE 0.01 Relatively coarse dashed lines result
- Pen -- Set line color
Syntax: PEn <n> (or) COLor <n>
Selects <n> as the current pen to be used for plotting curves and annotating
text. Default is PEN 1. On video terminal, PEN changes are mapped into
either color changes or changes in the attribute of a black/white line (if
possible). If PEN is specified as negative, the actual color will be given
the absolute value of the PEN color. However, after each curve is drawn, the
PEN color will be incremented to the next possible value (wrapping back
around to 1). The actual number of pens available on a given device is
determined from the DEVICES.DAT file at the time a device is initialized.
Example: PEN 1 - selects pen 1 (usually black)
COLOR -3 - select pen 3 and change after each curve
Note: 1) On IBM EGA monochrome monitors, pen colors are blinking and low
intensity, and are not terribly useful. Use LTYPE or SYMBOL to
distinguish different curves.
2) The pen command has no affect on the AXIS color. It is automatically
set to be PEN 1. See AXIS and SGRAPH for information on changing
this default color map.
- Linewidth -- Set the line thickness or laser printers
Syntax: LINEWIdth <n>
This command specifies the thickness of a line for those devices which can
change it, e.g., laser printers. <n> is specified in units of 0.007" and is
internally maintained to 0.001". Try it an see.
- Visibility -- Set line visiblity
Syntax: VISibili [-1 | 0 | 1]
Sets the visibility of subsequent vectors drawn according to:
1 => draw on
0 => draw off (erase)
-1 => draw complementing (if on, turn off; if off, turn on)
Note: 1. Very few devices can implement this command.
2. Line drawing of closely spaced points may not give expected results
complementing mode since each pixel may be drawn more than once while
drawing the curve.
3. The ERASE mode is frequently nice to eliminate a misdrawn curve from
the screen. It will not, however, remove it from a HCOPY file.
Commands to control the type and scales on the axes
See also sections covering AUTOERASE and SGRAPH commands
- Axis -- Draw the axes
Syntax: AXis (or) AXes
Draws the axes, including labels. Will erase the screen unless AUTOERASE is
off. Same as the AXES command.
- Autoaxis -- Toggle automatic drawing of axes by PLOT
Syntax: AUTOAXis {ON | OFf} (or) AUTOAXes {ON | OFf}
Toggles automatic drawing of axes with the Plot command. The default is
AUTOAXES ON. With this OFF the Plot command is similar to Overaly. You can
use the Axes or Axis command to draw the axes as needed.
- Boxmode -- Toggles drawing of the top and right axes
Syntax: BOXmode {Yes | No}
Toggles the box drawing mode of drawing axes. Default is BOX YES. With this
option set to NO you get only the left and bottom axes.
- Setup -- Enter graphics setup screen for plot info
Syntax: SETUP
Enter the graph setup screen. This allows you to set many of the plot
parameters such as labels and line types within a single screen menu type
enviroment. The arrow keys are used to move the cursor within the screen.
Other EMACS like keys work also. ^D, ^K, ^E, ^A, ^N, ^Z.
- Region -- Specify min/max values for each axis
Syntax: REGion {BOTtom | Left | Top | Right}{AUTO | <rmin> <rmax>}
Specifies a minimum region, along either x-axis or either y-axis, that the
graph must contain. GENPLOT then picks appropriate minimum and maximum values
for the axis labeling. Unless these regions are forced with the FORCE
command, the actual regions may be larger. If this command is never issued,
GENPLOT chooses a reasonable region. The format is REG axis min max, where
axis is Left, Top, Right, of Bottom. Once a region has been specified for a
given axis, the AUTOSCALING is turned off for that AXIS. Use AUTOX or AUTOY
to turn autoscaling back on if necessary.
- Set -- Specify min/max values for each axis
Syntax: SET {BOTtom | Left | Top | Right}{AUTO | <rmin> <rmax>}
Same as the REGION command.
- Force -- Force GENPLOT to use your exact axis scale
Syntax: FORCe {Yes | No}
When you specify a region, or a scale for an axis, GENPLOT picks appropriate
minimum, maximum, and interval values for that axis which include the region
you specify. In order to make the plot attractive, these values are rounded
up and down to "reasonable value" and hence include more than the specified
region. Setting FORCE to YES before specifying a region forces GENPLOT to use
the exact values given for the minimum and maximum axis ranges. Auto
determination of the axis scales will also be forced to the exact values.
Specifing the lower and upper values as equal with this FORCE YES will result
in a system hang since an axis will be drawn over a 0 interval (tough luck).
The default is FORCE NO.
- Autox -- Toggle auto-scaling for the X axes
Syntax: AUTOX {BOTH | Top | BOTTom | Off} (or) AUX
Toggles auto-ranging (auto-scaling) for the x-axes. You must specify which
axis you want on or that you want to turn it off. The default is AUTOX BOTH.
When ON GENPLOT will calculate the minimum and maximum values for the x-axis.
It does a pretty good job of this.
If you want to set your own values, use the REGION command. If after using
the region command you read in some new data that lies outside the minimum
and maximum values you specified, subsequent plot commands will not plot the
new data. You may either issue another REGION command or this AUTOX command
to toggle autoranging on again in order to plot the new data.
- Autoy -- Toggle auto-scaling for the Y axes
Syntax: AUTOY {Both | Left | Right | Off} or AUY
Toggles auto-ranging for the y-axes. See AUTOX. You must specify which axis
you want on or that you want to turn it off. The default is AUTOY BOTH.
When ON GENPLOT will calculate the minimum and maximum values for the y-axis.
It does a pretty good job of this.
If you want to set your own values, use the REGION command. If after using
the region command you read in some new data that lies outside the minimum
and maximum values you specified, subsequent plot commands will not plot the
new data. You may either issue another REGION command or this AUTOY command
to toggle autoranging on again in order to plot the new data.
- PLX -- Select axis to use for the plotted X data
Syntax: PLX {Bottom | Top}
Sets which x-axis the data is plotted against, i.e., either the TOP or BOTTOM
axis. Default is PLX BOT.
- PLY -- Select axis to use for the plotted Y data
Syntax: PLY {Left | Right}
Sets which y axis the data is plotted against, i.e., either the LEFT or the
RIGHT axis. Default is PLY Left.
- LABel -- Set the axis label
Syntax: LABEL {Bottom | Left | Top | Right] <text>
Specifies a label to use for a given axis. For example, `LABEL BOT
Example: LABEL BOTTOM 'Temperature'
LABEL LEFT 'Oxide density (g/cm^{2})'
Quote characters are required if imbedded spaces or lower case letters are
desired. If no label is given on the command line, the prompt assumes quote
marks and none should be given.
- SUBTicks -- Toggle subtick mark plotting
Syntax: SUBTicks {ON | OFf}
Toggles the Subtick mode off and on. Default is SUBT ON. Subticks are the
tick marks between the labeled major tick marks. Publication plots should
not include sub tick marks.
- Inticks -- Toggles direction of the tick marks
Syntax: INticks {Yes | No}
Causes the tick marks on the axis to go either in or outward. Default is
inward, INTICKS YES.
- XTop -- Control axis labeling for the top axis
Syntax: XTOP {OFf | ON | Bottom | NONlinear}
Toggles the axis labeling for the top x axis. Default is XTOP OFF.
BOTTOM will cause the top axis to be exactly like the bottom one.
NONLINEAR is a way of connecting the top and bottom axes with an arbitrary
function, by defining the equation, and it's inverse. For example:
region bot 1 4 reg top 1 4
xtop nonlinear
define bottom_to_top(x) = (1000/x)-273
define top_to_bottom(x) = 1000/(x+273)
See Section 4e of the manual for a complete example.
- YRight -- Control axis labeling for the right axis
Syntax: YRIGHT {OFf | ON | Left | NONlinear}
Toggles the axis labeling for the top x axis. Default is YRIGHT OFF.
LEFT will cause the right axis to be exactly like the left one.
NONLINEAR is a way of connecting the left and right axes with an arbitrary
function, by defining the equation, and it's inverse. For example:
region left 1 4 reg right 1 4
yright nonlinear
define left_to_right(x) = (1000/x)-273
define right_to_left(x) = 1000/(x+273)
See Section 4e of the manual for a complete example.
- Logarith -- Use logarithmic axis
Syntax: LOGarith {BOTh | Bottom | Left | Top | Right} { ON | OFf}
The default is OFF. This command only controls the labelling of the axis,
not how the data is plotted. An X value of 1 is labelled as 10, and a value
of 2 is labelled as 100. To actually plot logarithmic data, you must take
the logarithm yourself.
REG LEFT 0 2 LOGARITHM LEFT ON LET y = log(y) PLOT
The left axis will be labeled from 1 to 100, but plot is linear from 0 to 2.
- Chrset -- Select the character set for labeling
Syntax: CHRset <n>
Changes character set. <n> is an integer between 0 and 9. Synonymous with
the CHARACTER command. Default character set is 1.
0 - Special symbols
1 - Normal
2 - Greek characters
3 - Bold characters
4 - Bold Greek characters
5 - Old English
6 - Different order of Greek character
7 - Different order of bold Greek characters
8 - Script
9 - Script greek
The number and type of character sets available is determined by the
HDATA.CHR file loaded at run time. This file contains vector strokes for
making the characters. Another version of HDATA.CHR (HDATA4.CHR)
is available for use containing only character sets 0-4 to conserve memory.
- Characte -- Select character set for labeling (CHRSET)
Syntax: CHARActe <n>
Synonymous with the CHRSET command.
- AXCTRL -- Modify characteristics of individual axes
Syntax: AXCTRL {TOP | BOTTom | LEFT | RIGHT} {-options}
The AXCTRL command allows the characteristics of a single axis to be modified
independent of the other axes. Operations include specifying the direction of
the tick marks and status of labelling. Options are taken from the following
set. In general, -NOxxxx undoes the effect of of an -xxxx option.
-ON -OFF - Turn the axis completely on or off
-INTICKS -NOINTICKS - Draw tick marks into or out of the plot box
-LABEL -NOLABEL - Turn label on or off for the axis
-ROTATE -NOROTATE - Specify rotation of the tick mark labels
-SUBTICK -NOSUBTICK - Specify status of sub-tick marks
-TICKS -NOTICKS - Specify status of all tick marks
-BRIEF -NOBRIEF - Brief labels only the first and last tick marks
-SPECLOG -NOSPECLOG - Allow for special logarithmic labelling
-JUSTIFY -NOJUSTIFY - Causes the first and last labels to align with axes
-DX <r> - Sets spacing between major tick marks (user units)
-DX2 <r> - Sets spacing between minor tick marks (user units)
-MX <n> - Sets labelling mode. +n -> n decimal digits
-XSTART <r> - Fraction along plotting area for axis start point in X
-YSTART <r> - Fraction along plotting area for axis start point in Y
-LENGTH <r> - Fraction of plotting area for axis length
For DX,DX2 and MX: Values of 0.0 cause the best default values to be used
Controlling the physical plot size and position
Position and Size Commands for Plot
These commands provide control over placement and size of a plot on the
physical device. All parameters below may be changed.
_______________________________________
| | |
| YMARGIN | |
| X |-------------------------| | |
| M | | | Y
| A | PLOTTING AREA | | S
| R | | | I
| G | | | Z
| I | | | E
| N | | | |
| |-------------------------| | |
|<-------------- XSIZE -------------->| |
|_____________________________________| |
|----XOFF----| !
!YOFF
!
|_ Origin !
- SIZe -- Set the size of the plotting area
Syntax: SIZe [horizontal vertical]
Sets the Horizontal (X) and Vertical (Y) plotting area. This area includes
any margins that are set; the actual axis length will be smaller than the size
given with this command. The format is SIZE <X> <Y> where <X> and <Y> are
given in inches. Note that the order of <X> and <Y> has changed from early
versions. Default size is 9.0x7.3 which should fit on all HP plotters.
- Offset -- Specify the offset of the graph from the lower left corner of physical page
Syntax: OFfset [x,y]
Offsets the entire plot within the valid range of the plotter. The values
are specified in inches scaled by the current SHRINK factor. This corner is
not the origin of the plot, but is displaced from the origin by the margin
size. The default is OFFSET 0.5 0.
- Margin -- Specify margins around the axes to provide space for labels
Syntax: MARGin [x,y]
A margin is maintained around the plot area for axis labels and titles. The
default margins are 0.85 for x and 0.85 for y. Twice the margins (for both
sides of the plot) are subtracted from the plot size to determine the window
for actual data plotting. It should not be necessary to change the margins.
OFFSET and SHRINK provide better ways to move the actual plot. If you want
plots an exact size, set MARGIN 0 0 and use offset to move the labels on
screen. The plotting area will then be exactly the size specified with the
SIZE command.
- SHRink -- Reduce the size of the plot
Syntax: SHRink <n>
Changes the size of the graph by the factor given. For example, SHRINK 2
produces a graph 1/2 as large as the original. The results are not
cumulative. Typing another SHRINK 2 command will produce exactly the same
graph. SHRINK 1 will produce a full size plot again.
- SUB_PLOT -- Establishes a region for a sub-plot within a larger plot
Syntax: SUB_PLOT [-CANCEL | -ENTER x1 y1 x2 y2]
The sub_plot command resets the shrink, size and offset factors to create a
small plot within a larger plot. The default is for the region to be defined
by a cursor, setting the lower left and right corners of the sub-plot area.
The values may also be established with the -ENTER option.
Once established, the AUTOERASE is turned off, and the next plot will be drawn
within the SUB_PLOT area. Sub_plot remains active until explicitely cancelled
using the SUB_PLOT -CANCEL command.
- Flipxy -- Flip the X and Y axes on the page
Syntax: FLIPXY [YES | NO]
This commands FLIPS the X and Y axes on the physical page. In normal plotting
circumstances, the X axis is chosen to be the long direction of the paper.
This command allows plots to be rotated 90 degrees, so the Y axis corresponds
to the long paper axis. This may be necessary when plots are included in
typed text or when making figures. When specifying FLIPED coordinate sets,
it is almost always necessary to either change the plot SIZE, or to SHRINK
the entire plot to fit within the new boundaries. The default is FLIPXY NO.
Example: FLIPXY yes SHRINK 1.8 Creates vertical plot reduced by 1.8x
FLIPXY no Returns to standard mode.
Note: This command works on video monitors as well. Be prepared to sit
sideways for several hours when using this command (or turn your
monitor by 90 degrees)
Get information about the plot and its parameters
- Cursor -- Examine data point values with the cursor
Syntax: CURSOR [ [-CURVE] <curve>] [-TRACK [-Point <n>]]
Draws the cursor on the screen where you can move it around and read points
from your plot. Pressing any key causes the value of the cursor to be
printed on the console. If the <space> or <0> key was pressed, the cursor
will return. Press any other key to return to GENPLOT prompt.
The cursor normally is in fast mode, each press of an arrow key moves the
cursor by many pixels. Holding the <SHIFT> key down will slow the movement of
the cursor to single pixel mode. Alternatively, the <INSERT> key will
reverse the action of normal and <SHIFT> cursor keys. Unshifted will be slow
and <SHIFT> will be fast. Pressing <INSERT> again toggles the state.
The -TRACK option causes the cursor to follow your data point by point. The
current point is printed automatically on the screen as the cursor moves.
Pressing the <space> bar will cause the point value to be left on the screen.
Pressing any other key leaves the cursor mode. The up arrow will go only in
the direction to increase the Y value, likewise the down arrow. The -POINT
sub-option causes the cursor to start with the <nth> point rather than at
point number one. Operation is identical otherwise.
- STatus -- Display the data set information
Syntax: STATUS [ [-CURVE] <curve>]
Displays status of a data set, including the number of points and the x and y
minimum and maximum values. This is displayed when a data file is read.
- SHow -- Display the current data set as x,y pairs
Syntax: SHOW [ [-CURVE] <curve>] <low x> <high x>
Displays the current data set as a list of x,y pairs between the given X
values
- Parameter -- List various plotting parameters
Syntax: PARamete
Lists various plotting parameters. Some of these are axis titles and ranges,
linetypes, margin sizes, and plotting sizes and offsets.
- Parms -- List various plotting parameters
Syntax: PARMS
Lists various of the plotting parameters. Same as Parameter.
Creating data sets and analyzing data
This section describes commands which analyze, fit or modify an existing data
set or which create new data sets. Commands in one category transform or
modify the main curve, such as sorting, exchanging X and Y coordinates, edit
the data set, or impose a fixed grid. The second sub-division is more complex
and includes the commands to create, transform or fit data.
- USER -- Load user routine and execute subroutine USER$
USER [-LOAD <user_module>]
The command USER transfers control of GENPLOT to the user written subroutine.
User routines may process commands or modify the data as necessary to
implement any degree of user control.
The USER subroutine, along with subroutines implementing the -USER options of
the READ and WRITE commands, are loaded from the dynamic module USER$.OVL.
The -LOAD option redefines the name of the load module to <user_routine> and
loads (or reloads) the specified module. The <user_routine> can only be a
name and extension and must exist either in the current directory or in the
C:\GENPLOT directory. Default extension is .USR to distinguish user written
routines from GENPLOT routines. See the Appendix S for details.
Example: GENPLOT: USER
... Default USER$.OVL is loaded and subroutine USER$ executed
GENPLOT: USER -LOAD RUMP
... Current USER routine is deallocated and RUMP.USR is loaded. The
... subroutine USER$ is passed control.
GENPLOT:
- SORT -- Sort data by ascending/descending X
SORT [ [-CURVE] <curve>] [-REVERSE|-NOSORT|-STRICT|-XONLY|-YONLY|<others>]
This command sorts data by ascending or descending X values (using a heap
sort), or randomizes the order of the data (-RANDOM). Without options, SORT
performs an ascending sort on X with all data points retained.
Options:
-NORmal ==> Sort by ascending X values
-REVerse ==> Reverse the order of the data within the arrays
-NOSort ==> Do not perform the sort itself (useful with -REVERSE & -DELETE)
-DELete ==> Delete adjacent points with same X. The Y value of the
point is either the first Y found or the average (-AVERAGE).
-STRict ==> Same as -DELETE
-AVErage ==> Used with -DELETE, the average of Y replaces multiple values
-XONly ==> Modify only the X values. Leave Y data unchanged.
-YONly ==> Modify only the Y values (Incompatible with SORT)
-RANdom ==> Randomize the order of the data (SORT disabled)
Example: SORT Ascending X value sort of the data
EXCH SORT EXCH Ascending Y value sort of the data
SORT -REVERSE -DELETE -AVERAGE Reverse sort. Duplicates removed.
SORT -RANDOM Randomizes the data set
SORT -REVERSE -NOSORT Reverses the order of the data set
- Exchange -- Exchange the X and Y data points
EXchange [ [-CURVE] <curve>] (or) TRADE [ [-CURVE] <curve>]
Exchanges the x and the y data points.
- Fix_Grid -- Force the data set against a linear grid
FIX_GRID [[-CURVE] <curve>] [-Points <n>|-Range <xl> <xh>|-From <xl>|-To <xh>]
Defaults: <n> - number of points in the current data set
<xl>,<xh> - previous value of xl,xh. Initial = -/+1E37
The current data set is linearly interpolated onto the specified linear grid.
An evenly spaced X grid is created over the range from <xl> to <xh> with <n>
data points. The Y value at each point is subsequently determined at each
point by linear interpolation from the two closest datum in the original set.
Points outside the bounds of the original data set are set equal to the Y
value at the edge.
This command is used primarily to create equally grids for adding or
subtracting curves or to create a constant spacing grid for use with the fast
fourier transform.
WARNING: An implicit SORT is performed on the data. The algorithm requires
that the X coordinates be strictly increasing.
- Cull_Data -- Eliminate a range of data
CULL_DATA [[-CURVE]<cv>] {DELETE|KEEP} {XRANGE|YRANGE|CURSOR|BOX|FOR|abort}
This commands allows for culling of data to eliminate or keep only selected
ranges. Currently, only retangular data cuts are allowed (BOX mode). Data
selected within an Xrange, Yrange or box may be kept or deleted as specified
by the first token.
Example: CULL_DATA DELETE XRANGE -1.38 1.85 Deletes any point with an x
value in interval [-1.38,1.85]
CULL_DATA KEEP XRANGE -1.38 1.85 Deletes any point NOT in the
interval [-1.38,1.85]
BOX and CURSOR are synonymous and bring up a BOX cursor to select a region of
the data. Points within the box are kept or deleted as required. Someday,
an arbitrary curve will be used to specify the allowed regions.
- Edit_dat -- Add or delete data points
EDIT_dat [ [-CURVE] <curve>]
This is a strange command for those of us who want better fits. Allows for
addition or deletion of specific data points. A cursor will automatically be
brought up with this command. The following keys have the effect listed
<space> - list out value of cursor position
<X> - delete the nearest point (within reason)
<A> - add a point at the cursor.
If you want to change your data to fit theory better, then this command is
pretty handy.
Recommended usage: LTYPE 0 SYMBOL 3 PLOT EDIT_DATA
In this mode (with any symbol type other than 0), deleted data points
disappear from the graph and added data points appear.
- Create -- Create a data set with a function
CReate Y = <fnc> [-Range <r1><r2>][-From <r1>][-To <r2>][-Points <n>|-By <dx>]
Creates a curve according to a specified expression. For example, `CR y =
1/(9.3e-6*x+4.2e-4)*x**.5'. Note that the CREATE comand, the 'y', the '=',
and the expression to create MUST be delimited by spaces and the expression
CANNOT contain spaces.
Support is provided for almost any function you will routinely use. See HELP
on the expression evaluator for further information.
The defaults is 200 (n) data points from 0.0 (r1) to 1.0 (r2). Either
-Points or -By may be specified, but not both. The range and points inputs
are character strings and hence may themselves be functions which change
value between calls. Values given for r1,r2,npt and dx will be retained
between invokations of CREATE.
Example: CREATE Y = SIN(X)*EXP(X/10) -FROM -10 -POINTS 1000 -TO 20
Example: CREATE Y = F(X) -FROM @min(x) -TO @max(x) -POINTS npt
In the second example, the function will always be created within the range
of the current X data with the same number of points.
- TRANSform -- Transform the data by various standard functions
TRANSform [ [-CURVE] <curve>] [X|Y|XY] {transform_type}
Data transformation command. Handles transforms that are either not possible
with the simple LET command or extremely difficult. These include numerical
differentiation, integration, summing, differencing, binning and various
fourier transforms.
The initial X or Y specifies which element of the current curve is to be
operated on. For most transformation, Y is the correct choice. Selecting X
simply exchanges the X and Y arrays and proceeds. Where appropriate, the X
and Y sets are exchanged again upon return from the TRANSFORM. Most
transforms however redefine both X and Y on exit.
- LIst
List the available transformations
Syntax: TRANSform [X|Y|XY] LIst
Lists the available transformations. Provides a quick listing of all current
transformations and immediately requests the desired one. To exit without
without affecting the data, type ABORT to the prompt for transformation.
- ABORT
Aborts the transformation without doing anything
Syntax: TRANSform [X|Y] ABORT
Aborts immediately. The data set will remain unchanged from before invokation
of the TRANSFORM command.
- ROTate
Rotate the current X-Y data set through a specified angle
Syntax: TRANSform [X|Y] ROTate <angle>
The current X-Y data set is rotated through the specified angle. A rotation
of Y through +90 degrees maps the X axis onto the -Y axis and the Y axis onto
the X axis. The angle is specified in degrees. If Y is specified in the
transform, positive angles corresponds to clockwise rotations. If X is
specified, positive angles corresponds correspond counter-clockwise rotation.
Example: TRANSFORM Y ROTATE <theta> X <== X*cos(theta) + Y*sin(theta)
Y <== Y*cos(theta) - X*sin(theta)
- ROLL
Roll the current data set through a specific number of points
Syntax: TRANSform [X|Y] ROLL <# points>
The ROLL transformation "rolls" the data on itself creating a new "first"
point. Given a roll count of J, the point I is moved to position I+J with
overflows wrapping back to the beginning of the data set. This transform
is most commonly used with FFT's where the data set is considered repetative.
Example: TRANSFORM X ROLL 30 X(i) <== X(i-30)
- SUM
Replaces X or Y with partial sums over the X or Y array
Syntax: TRANSform [X|Y] SUM
The SUM transformation causes each element of the array to be replaced by the
sum of all preceeding elements. While similar to the INTEGRAL transform, SUM
does not consider the X values in the SUM.
Example: TRANSFORM Y SUM Y(n) <== SUM [Y(i)] from 1 to n
- DIFference
Replaces X or Y with difference between elements
Syntax: TRANSform [X|Y] DIFference
The DIFFERENCE transformation is the formal inverse of the SUM transformation.
Each element in the array is replaced by the difference between the current
value and the value of the preceeding point. The value of the first element
(being ill-defined) is arbitrarily set to 0.
Example: TRANSFORM Y DIFFERENCE Y(i) <== Y(i)-Y(i-1)
Y(1) <== 0
- DY/DX
Evaluate point-to-point derivative of the data set
Syntax: TRANSform [X|Y] DY/DX
The current X or Y is replaced by a estimate of the derivative at the same
point. A 3 point derivative is used which is exact to second order. The
curvature is assumed constant for evaluating the derivative at the end points.
The number of data points remains constant and the derivative are evaluated on
the original data positions. No sorting is done before differentiating.
Example: TRANSFORM Y DY/DX Y(i) <== estimate of (dY/dX) at X(i)
- INTegral
Point-to-point trapezoidal integration
Syntax: TRANSform [X|Y] INTegral
The data set is replaced by an estimate of it's integral. A simple point by
point trapeziodal integration is utilized. No sorting of the data set is
done prior to the integration. The number of data points remains fixed and
the estimates are made at the given nodes.
Example: TRANSFORM Y INTEGRAL Y(i) <== Trapezoidal estimate of INTEGRAL(Y)
- HISTOGRAM
Transforms the X or Y data into histogram bins
Syntax: TRANSform [X|Y] HISTogram <window>
TRANSform [X|Y] BIN <window>
Generates a histogram of the selected data variable (X or Y). The values of X
or Y are "binned" into windows and the number occuring in each window are
counted. This number becomes the ordinate of the transformed datat set with
the abscissa set to the center value of the bin. The default window size is
.01 times the data range, i.e. bin into 100 intervals. The specified <window>
value will be altered if it requires more data points for storage than are
available in the current buffer.
In the HISTOGRAM or BIN transform, the windows are always set up so that zero
lies on a boundary between two windows. The CENTERBIN (CBIN) transform is
almost identical except that the created windows are centered on 0.
Example: TRANSFORM Y HISTOGRAM 4
Input: Output: The bins are set up in these windows
------- -------- ------------------------------------
173,19 12.5,0 [10,15) Center at 12.5, 0 events
1,29 17.5,2 [15,20) Center at 17.5, 2 events
1,18 22.5,0 [20,25) Center at 22.5, 0 events
27.5,1 [25,30) Center at 27.5, 1 events
See also: PLOT or OVERLAY -HISTOGRAM mode to plot the histograms.
- BIN
Transforms the X or Y data into histogram bins
Syntax: TRANSform [X|Y] HISTogram <window>
TRANSform [X|Y] BIN <window>
Identical to the HISTOGRAM transform. See HISTOGRAM description for details.
- CENTERBIN
Transforms the X or Y data into histogram bins centered on 0
Syntax: TRANSform [X|Y] CENTERBin <window>
TRANSform [X|Y] CBIN <window>
Generates a histogram of the selected data variable (X or Y). The values of X
or Y are "binned" into windows and the number occuring in each window are
counted. This number becomes the ordinate of the transformed datat set with
the abscissa set to the center value of the bin. The default window size is
.01 times the data range, i.e. bin into 100 intervals. The specified <window>
value will be altered if it requires more data points for storage than are
available in the current buffer.
In the CENTERBIN or CBIN transform, the windows are always set up so that zero
lies centered on a window. The HISTOGRAM (BIN) transform is almost identical
except that the zero lies on the boundary between two windows.
Example: TRANSFORM Y CENTERBIN 4
Input: Output: The bins are set up in these windows
------- -------- ------------------------------------
173,19 15.0,0 [12.5,17.5) Center at 15 0 events
1,29 20.0,2 [17.5,22.5) Center at 20 2 events
1,18 25.0,0 [22.5,27.5) Center at 25 0 events
30.0,1 [27.5,32.5) Center at 30 1 events
See also: PLOT or OVERLAY -HISTOGRAM mode to plot the histograms.
- CBIN
Transforms the X or Y data into histogram bins centered on 0
Syntax: TRANSform [X|Y] CENTERBin <window>
TRANSform [X|Y] CBIN <window>
Identical to the CENTERBIN transform. See CENTERBIN description for details.
- SMOOTH
Smooths data by a five point averaging technique
Syntax: TRANSF [X|Y] SMOOTH
The data in the specified X or Y buffer are replaced by a 5 point weighted
average of nearby points to reduce noise. The implemented smooth is the 5
point Savitsky-Goulay algorithm where
y(n) = (-3*y(n-2)+12*y(n-1)+17*y(n)+12*y(n+1)-3*y(n+2))/35
The smooth is stable and can be executed several times to any desired degree
of smoothing.
- SMOOTH_FFT
Smooths data by a FFT algorithm with specified width
Syntax: TRANSF [X|Y] SMOOTH_FFT <points>
The data is smoothed using the equivalent of an FFT_FILTER operations. The
filter is an inverted quadratic (1-(A*F)**2) where A is proportional to the
specified <points> width. Larger values of <points> removes higher frequency
components with a correspondingly smooth curve. The linear component of the
data trend is removed before the FFT so the data set will always begin and end
at the same points and only data in between will be smoothed.
The X coordinates of the data set ignored completely in this transformation
and are assumed to be uniformly spaced.
- FFT
Take various FFT transforms of the current data set
Syntax: TRANSform [X|Y] FFT [-switches]
Performs a fast fourier transform on the selected variable or on the
CBUF$R/CBUF$I arrays. For the current data set, an even spacing of the X is
assumed spacing with the first and last used to determine the frequency scale.
FIX_GRID may be used to create a uniform spacing grid before calling this
transform. The data set will be blank padded or truncated to the next valid
power of 2. (You may want to pad in some other manner yourself).
Switches:
-POWER Returns the power spectra of the current data set. This is an
in place operation returning NPT/2+1 points. It may be modified
by the the following windowing options. Default is -WELCH.
-SQUARE -PARZEN -WELCH -HANNING
-CBUF Perform the transformation on the CBUF$R/CBUF$I array pair.
-COMPLEX Return the entire complex spectra in Y.
-FULL Work with the entire complex spectra instead of symmetric half.
-FORWARD Perform a forward transformation (DEFAULT)
-INVERSE Perform the inverse transformation
-REAL Return the real component of the transform to Y
-IMAGINARY Return the imaginary component of the transform to Y
-MAGNITUDE Return the magnitude of the transform to Y
Errors: 1) Transform of less than 8 points
2) No space to allocate CBUF$TMP for complex transform (8*npt bytes)
- FILTER_FFT
Filter a data set via an FFT multiplied by a user filter in frequency space
Syntax: TRANSform [X|Y] FILTER_FFT <array>
- AUTOCorrelation
Returns the digital autocorrelation function of the current data set
Syntax: TRANSform [X|Y] AUTOCorrela
This transform implements an FFT based autocorrelation of the data set. The X
coordinates are assumed to be evenly spaced and the lag/lead times are based
on the spacing of the first two points. If the data set is not an even power
of 2, it will be blank padded to the next valid power of 2. The data is
returned with zero lag at the center of the spectra Y(NPT/2-1) and with
positive lag in Y(NPT/2:NPT).
Example: TRANSFORM Y AUTOCORRELATION
Current data set: 282 points Y(i) <== SUM y(i+j)*y(j)
Final data set: 512 points X(i) <== lead/lag times
- CORRelation
Returns the digital correlation of the current data set with another curve
Syntax: TRANSform [X|Y] CORRelation <curve> [-PAD] [-NOWarning]
This transform implements an FFT correlation of the data set with another
curve. The X coordinates of both data sets are assumed to be evenly spaced
and the lag/lead times are based on the spacing of the first two points in the
current data set. A warning message is given if the spacings are different
but the correlation is performed anyway. In all cases, the origin of the two
data sets are aligned. -NOWARNING suppresses the error message.
The data set is always blank padded to the next valid power of 2. If -PAD is
specified, the data set will be additionally padded to avoid end effects if
possible. The X values are set to the lead/lag times with 0 at the center
Y(NPT/2-1) if both data sets have the same X coordinates. If the X range of
the two data sets differ greatly, the data may need to be ROLLed.
Example: TRANSFORM Y CORRELATION C1 -PAD
Current data set: 282 points Y(i) <== SUM y(i+j)*c1:y(j)
C1 data set: 282 points X(i) <== lead/lag times
Final data set: 1024 points
- CONVolution
Returns the digital convolution of the current data set with another curve
Syntax: TRANSform [X|Y] CONVolution <curve> [-PAD] [-NOWarning]
This transform implements an FFT convolution of the data set with another
curve. The X coordinates of both data sets are assumed to be evenly spaced
and the final X values are based on the spacing of the first two points in the
current data set. A warning message is given if the spacings are different
but the convolution is performed anyway. In all cases, the origin of the two
data sets are aligned. -NOWARNING suppresses the error message.
The data set is always blank padded to the next valid power of 2. If -PAD is
specified, the data set will be additionally padded to avoid end effects if
possible. The X values are set to correspond to the original X values plus
the assymetry of the convoluting data set. For this reason, the convoluting
data set should be made symmetric in time if possible, or representative of
the shift expected.
Example: TRANSFORM Y CONVOLUTION C1 -PAD
Current data set: 282 points Y(i) <== SUM y(j)*c1:y(i-j)
C1 data set: 282 points X(i) <== corrected time
Final data set: 1024 points
- DECONVoluti
Attempts a de-convolution of the current data set by another curve
Syntax: TRANSform [X|Y] DECONVol <curve> [-PAD] [-NOWarning] [-SNR <value>]
This transform attempts an ill-advised de-convolution of the current data set
with another curve. The X coordinates of both data sets are assumed to be
evenly spaced and the final X values are based on the spacing of the first two
points in the current data set. A warning is given if the spacings are
different and the origins are aligned. -NOWARNING suppresses the message.
The data set is blank padded to the next valid power of 2 with additional
padding if -PAD is specified. X values are shifted by any <curve> assymetry
and hence <curve> should be created symmetric in time if possible.
Deconvolution is very sensitive to noise in the original data. The -SNR
option sets a minimum value for the inverse of the <curve>'s FFT. Increasing
the value increases noise with improved frequency response while decreasing it
smears out the final function. Values of 10-2000 are reasonable.
Example: TRANSFORM Y CONVOLUTION C1 -PAD -SNR 100
Current data set: 282 points Y(i) <== SUM y(j)*c1:y(i-j)
C1 data set: 282 points X(i) <== corrected time
Final data set: 1024 points
- LSQFit -- Linear-least square fit, see FIT LINEAR
LSQFIT [[-CURVE]<cv>] [-RANGE <x,x,y,y>|-XRANGE <x,x>|-YRANGE <y,y>|-CURSOR]
Produces a least linear square fit to the current data set. A limited range
of the data can be specified using the options. The best fit line will be
drawn through the data after calculation of the least squares fit.
Note that this is similar to FIT LINEAR command. However FIT LINEAR does not
currently allow for limited regions and does not automatically plot the best
fit line. LSQFIT, however, does not create the function FIT(X) after finding
the coefficients.
Recommended new usage:
FIT LINEAR OVERLAY -F FIT(X) -FROM @MIN(X) -TO @MAX(X) -LT 1
- -Range
Use X values to select range, see XRANGE
Syntax: -Range <xmin> <xmax>
Causes least squares fit to use only points with X values between specified
values. Synonymous with -XRANGE
- -Xrange
Use X values to select range
Syntax: -XRange <xmin> <xmax>
Causes least squares fit to use only points with X values between specified
values. Synonymous with -RANGE
- -Yrange
Use Y values to select range
Syntax: -YRange <ymin> <ymax>
Causes least squares fit to use only points with Y values between specified
values.
- -Cursor
Use the cursor to select range
Syntax: -CURsor
Uses the cursor to specify a box (X and Y) range of data to use for the fit.
- Fit -- Fit the data to some analytic forms
FIT [[-CURVE] <cv>] {LIst | ABORT | LINear | POLYnomial <n> | SPLINE | NLSFIT}
Use to fit the data set to a curve. This is a complex function with numerous
modes.
- LIST lists the available fitting functions.
- LINEAR
Linear-Least squares fit of the data
Fits the data to a line and returns least squares analysis of slope
and offset, sigma error bars in slope and offset, variance and correlation
coefficient. Error message is possible if the determinant of the matrix is
too small.
Once the fit is determined, the function FIT(X) is defined which contains the
line definition. The variables CF(0) and CF(1) are defined with the offset
and slope. FIT(X) = CF(1)*X + CF(0).
- POLYNOMIAL
Polynomial least square fit
Syntax: POLYNOMIAL <n>
Polynomial least square fit of the data to order n (highest power of X used
in fit). Order must be less than or equal to 6. All data points are fit to
a polynomial function and standard least squares values for the polynomial
coefficients are obtained. Only the values of the coefficients and the
residual are reported to the console.
Once the fit is determined, the function FIT(X) is defined which contains the
line definition. The variables CF(0) through CF(n) are defined with the
function defined as FIT(X) = ((CF(2)*X+CF(1))*X+CF(0))
- SPLINE
Maybe Implemented at this time
Syntax: SPLINE [-SMOOTH <rms>]
Maybe implemented but not fully documented.
- NLSFIT
Non-linear least squares fit
Syntax: NLSFIT <commands>
NLSFIT is a command based non-linear least squares fit algorithm designed to
automatically minimize the difference between experimental data and a fitting
function. NLSFIT combines the gradient search and function linearization
methods to minimize the number of steps required to converge to the best
solution. It is based on the algorithm given in "Data Reduction and Error
Analysis for the Physical Sciences" by P.R. Bevington (McGraw Hill), chapter
11. The interested user is referred to this chapter for a detailed
description of the algorithm.
Steps: 1. Define a fitting function F(X) depending on A0, A1, A2 etc.
2. Set A0, A1, A2 parameters to reasonable initial values
3. Inform NLSFIT of the function and the variables (and possibly
analytic derivatives if available).
4. Execute the command FIT to search space.
5. Remember - Garbage In, Garbage Out.
See the example section for specific codes.
- Algorithm
Description of the NLSFIT algorithm
Given F(X) : depending also on A0, A1, A2, ...
A0, A1, A2 ... real parameters
(Y,X) experimental data set of NPT points
NLSFIT will search the parameter space of A0, A1, A2 ... etc. minimizing the
function chi squared, SUM ( [Y(i) - F(X(i))]**2 ). The fitting function F(X)
is expanded about the current guess A0, A1, ... in a Taylor series using
either analytic derivatives of the function F(X) with respect to A0, A1, A2,
or using numerically estimated derivatives of the function. If no
analytic derivation of the function dF/dA is available, the numeric
derivative is obtained by evaluating [f(x,A0+dA)-f(x,A0-dA)]/dA where dA is
approximately 1E-4*A0. There is a possibility that the derivative will be
zero if the initial guess for A0 is set to 0; otherwise, the technique should
be reasonably safe.
The algorithm selects a new estimate of A0, A1, ... based on a curvature
matrix evaluated from the derivatives. The new estimate is arrived at either
by the gradient method or by a linearization of the function chi squared,
alternating between these methods as necessary. Chi squared is required to
decrease at each iteration step, until either it changes by less than the
specified accuracy (EPSILON) or until the maximum number of iterations have
been executed (MAX_ITERATE).
- Function
Specifying NLSFIT fitting function
Syntax: FUNCTION [function name] or EQUATION [function name]
The fitting function for the experimental data must be specified to NLSFIT.
It must be a user-defined function (through DEFINE) of a single variable X,
which represents the ordinate of the data set. If FIT is the function
specified, the residual fit error is evaluated as Y-FIT(X). FIT must also
depend on other variables which are modified to minimize the residual error.
FIT must be a single name; it may not contain any mathematical operations or
other function calls.
Assume that the following defines have been executed
DEFINE AMP2(X,Y) = A0*X*Y
DEFINE AMP(X) = A0*SIN(X)
DEFINE FIT(X) = AMP(X)*SIN(A1*X)*AMP2(X,A2)
Legal Illegal
--------------- -----------
FUNCTION FIT FUNCTION FIT(X) Can only specify the function name
FUNCTION AMP FUNCTION AMP*FIT Only a single name - no operations
FUNCTION SIN Not DEFINED, although it does exist
FUNCTION AMP2 Will give garbage - not fnc of 1 var
See also: STATUS and RESET in other commands
- Variables
Specifying NLSFIT variables
Usage: VARY [var] [analytic derivative] or VARY [var] /
NLSFIT attempts to vary up to 10 parameters to determine optimum values for
fit of the data. The VARY command specifies these variables, and optionally
specifies analytic functions for the derivative of the fitting function with
respect to the variable. NLSFIT must determine the derivative of the fitting
function with respect to each parameter; this can be either by an analytical
function or by numerical evaluation by the program. The form of VARY with the
/ specifies that numerical methods are to be used. Note that analytic and
numerical derivatives may be mixed in same problem for different variables.
Assume: FIT(X) = A0*SIN(A1*X) A fitting function
DFDA1(X) = X*A0*COS(A1*X) Analytic derivative DF/DA1
DFDA0(X) = SIN(A1*X) Analytic derivative DF/DA0
Legal: VARY A0 DFDA0 Vary parameter A0, analytic derivatives
VARY A1 / Vary parameter A1, numerical derivatives
Illegal: VARY A0 DFDA0(X) Derivative can only be a function name
VARY A1 1 Derivative must be / or a function name
VARY A1 X*A0*COS(A1*X) Derivative can only be a function name
See Also: STATUS, REMOVE and RESET in other commands
- FIT
Running the fit
Syntax: FIT
This initiates the fitting operation. After several rudimentary checks of
specified constants and functions, the fit Y-FIT(X) is evaluated and the first
estimate of new parameter values are obtained. After each iteration, the
current value of chi squared and all of the parameters are printed out. FIT
continues to iterate until one of the convergence criteria are reached. After
convergence, the final value for each parameter will be printed, along with an
estimate of the sigma value (the curvature of chi squared at convergence). Be
very careful of the sigma estimates in the end!
NLSFIT: fit
-------------------------------------------------------------------------
CHISQR BP V0
-------------------------------------------------------------------------
2.835 1.300 0.5000E+05
0.1022 1.323 0.5020E+05
0.6186E-1 1.323 0.5020E+05
Variable Value: Sigma
-------- ------ -----
BP 1.323083 0.0023
V0 50204.21 1.3804
- Convergence
Setting convergence conditions
Syntax: ACCURACY [eps] MAX_ITER [n_max]
During running of the fit, NLSFIT will continue iterating until one of two
criteria are reached. The current iteration level is I, EPS and N_MAX are
constants.
(1) [chisqr(I+1)-chisqr(I)]/chisqr(I) .lt. EPS
(2) I .gt. N_MAX
The default values for EPS is 1E-4, and for N_MAX is 10. The commands
ACCURACY and MAX_ITER change these constants. The RESET command will return
these constants to their original values.
See also: STATUS
- Other
Status, modes and other commands
Syntax: See below
Other commands in NLSFIT
Syntax Function
============ ========================================================
HELP or ? Prints out a short list of legal commands
REMOVE <var_name> Removes a variable from the list to be varied for fit
STATUS Lists out the fitting function, variables and
or INFORMATION convergence criteria. (See example below)
RESET Releases all variables and function. Resets convergence.
MODES Sets or resets various internal operating modes
- STATUS
Fit information
Syntax: STATUS
Example of information given in STATUS command
==============================================================================
Non-linear Least Squares Fit Algorithm
Epsilon: 0.10E-06 Max_Iter: 10 Vector mode: T
Equation: MYFIT(XTMP)
Variable 1 is BP dF/da = none
Variable 2 is V0 dF/da = DV0(XTMP)
==============================================================================
The following commands were executed:
----------------------------------
RESET /* Releases all variables and resets world
ACCURACY 1E-7 /* Increase accuracy from default 1E-4
FUNCTION MYFIT /* Fitting function. The (XTMP) is added by NLSFIT
VARY BP / /* Vary parameter BP, no analytic derivative known
VARY V0 DV0 /* Vary V0, analytic derivative is DV0(X)
STATUS /* Print out the status above
- MODES
Set VECTOR operation YES or NO.
Syntax: MODE [YES | no]
There is only one user changable mode in the production version of NLSFIT,
VECTOR operation (see STATUS). NLSFIT requires calculation of the derivative
dF/dA for every parameter at every point in the data set (X,Y). This
calculation can be done either point by point, or in vector mode (default).
In vector mode, the derivatives dF/dA0 is calculated for all points X in one
operation. In point mode, dF/dA0, dF/dA1 etc. are calculated in order for
each point in order.
In vector mode, memory must be allocated to hold the derivatives. Given a
curve containing NPT points and M parameters to be varied, NLSFIT will attempt
to allocate memory for M arrays of NPT points. If there is insufficient
memory, the remaining parameters will have derivatives calculated point by
point. Since the memory is released after NLSFIT runs, and VECTOR mode is
substantially faster than points, VECTOR mode should be used in most cases.
However, in special cases you may need the derivatives to be calculated in the
specific order given in point mode. Be prepared for a significant degredation
in performance if VECTOR mode is turned off.
Enhancing the plot with labels, boxes, arrows and other things
- ANNotate --- Subprocessor for labelling plots
Sub-process to annotate the plot with text, symbols and designs
Syntax: ANNotate [commands] [SUB-PROCESSOR]
ANNOTATE (or ANNOTE) is a powerful subprocessor which provides functionality
to label and annotate a plot with text, symbols and experimental designs. To
get a complete list of commands, use the ? command. Once invoked, the user
enters ANNOTATE environment with a list of commands distinct from GENPLOT.
Once in ANNOTATE, the user remains there until an explicit "RETURN" is made
to GENPLOT, or an unrecognized command is typed. This feature, automatic
return to GENPLOT on unrecognized commands, is either a blessing or a curse
depending on your point of view.
There are 3 modes in ANNOTATE. The first is a text labeling mode which
provides the ability to place labels of arbitrary size and orientation on the
graph. The second level provides special commands to draw lines, circles and
arrows (no, we are not getting into Alice's Restaurant) or combinations
thereof. The third level is actually another subprocessor SAMPLE which draws
a sample structure for thin film work (or whatever else you make use of it
for).
- Lines and Arrows
Drawing lines and arrows on the plot [DRAW COMMANDS]
The following command draw lines and arcs. The format for coordinates is
normally [from] to [to] with arrowheads at the [to] end. The PARC and ARC
commands require a third point between [from] and [to to define the arc.
The qualifier DRAW may be placed before any of these commands without effect.
[2] => 2 coordinates requested
Command Description
-------------- ---------------------------------------------------
ARRow [2] Draws an arrow between 2 points w/ arrowhead
ARc [3] Draws arc from 1 -> 2 through 3 w/ arrowhead
Parc [3] Same as ARC but no arrowhead is drawn
Circle [3] Draws a circle through the 3 points
Retangle [2] Draws a rectangle with specified corners
Line [2] <ltype> Draws <ltype> type line between 2 points
Connect [n] Connect the dots drawing.
- Line
Draw a line between 2 points
Syntax: LIne [x1 y1] [x2 y2] <ltype> or LINE / <ltype>
Draw a straight line between the points.
- Arrow
Draw an arrow between 2 points
Syntax: ARRow [xbeg ybeg] [xend yend] or ARROW /
Draws an arrow with the tail at the first point and the arrow head on the
second point.
- Arc
Draw an arrowed arc between 2 points
Syntax: ARC [xbeg ybeg] [xend yend] [xmid ymid] or ARC /
Draws an arc with an arrow given a start, end and mid-point. The end point
gets the arrow head.
- Parc
Draw an arc between 2 points
Syntax: PARC [xbeg ybeg] [xend yend] [xmid ymid] or PARC /
Draws an arc without an arrow given a start, end and mid point.
- Circle
Draw a circle through three points
Syntax: CIrcle [x1 y1] [x2 y2] [x3 y3] or CIRCLE /
Draws a circle through the three points.
- RECTANGLE
Draw a rectangle with the corners at the given points.
Syntax: RECtangl [x1 y1] [x2 y2] or RETANGLE /
Draw a rectangle with the corners at the given points.
- CONNECTED
Draw a line connecting several points, dot-to-dot
Syntax: CONnect [x1 y1] [x2 y2] / or CONNECTED /
A connected line between the given points -- `connect the dots'.
To end, when entering position list directly, enter a / to the request for
the next point. When using the cursor, press the space bar (or a 0) causes
the cursor to reappear for another point. Exit by pressing any other key.
- Draw
Drawing prefix command, it is not needed
Syntax: DRaw [arrow | arc | connected | etc.]
The DRAW command is effectively a no-op in current implementations. The
command ARROW may be prefaced by DRAW ARROW, however ARROW works by itself
also.
- Text Labelling
Placing and controlling text on screen [ANNOTE Sub-commands]
Typed text may be placed on the screen in almost any size and at any angle.
As with line and arrow drawing, the position at which text is drawn may be
specified by either coordinate directly (x,y) or by requesting the cursor.
See the LABEL sub-command below for specifying the cursor. The position of
the cursor relative to the text (i.e. bottom left etc.) is controlled by the
ORGMODE command. See LABEL also for examples of multiple lines of text drawn
one below another.
- Label
Put a label on the plot
Syntax: LABel [ / | x1 y1] ['text']
Positions a given character string somewhere on the plot. Use of the /
allows the cursor to be used to determine positioning. If the text is
specified on the command line, it must be enclosed in single quotes if
imbedded spaces or lower case characters are desired. If the text is not
specified, the prompt will be issued and quote characters are unnecessary.
Any text line which ends in a ~ character specifies that another line of text
should be input and drawn directly below the current line (separated by the
SPACING distance). An arbitrary number of lines may be so linked. Note that
each line will be positioned according to the ORGMODE in effect, giving
either centered, right or left justified text.
If the cursor is used to input coordinates, the coordinates will be displayed
on the screen for incorporation into a macro if desired.
- Examples
Examples of text using the Label command
Label Command Examples
label 1 1 'Hi there' Draws "Hi there" at (1,1)
label / Thompson Draws "THOMPSON" at cursor posn
label / 'Hi~' 'there' Draws "Hi" and "there" on two
lines at the cursor posn.
label / 'Si_{3}N_{4}-SiO_{2}' Draws Si N -SiO at cursor
3 4 2
- Place
Put a label on the plot, see LABEL
Syntax: PLACe [ / | x1 y1] ['text']
Used to place text on your graph at specified positions. Same as LABel
command.
- Orgmode
Sets the origin for label, relates the cursor point to label location
Syntax: ORGmode [lb | lc | lt | cb | cc | ct | rb | rc | rt]
Sets the origin of the text to be a specific location within the text. The
default placement mode is LB, meaning the left-bottom corner of the text
region is placed at the point specified in a PLACE or a LABEL command. Other
mode options are LC (left center), LT (left top), CB (center bottom), CC, CT,
RB, RC, and RT (right top).
- Parameter
List the current labeling parameters
Syntax: PARamete
Lists the character height and spacing, and the origin placement mode.
- Parms
List the current labeling parameters, see PARAMETER
Syntax: PARMS
Lists the character height and spacing, and the origin placement mode. Same
as PARamete.
- Angle
Specify the text angle
Syntax: ANGle <degrees>
Specifies the angle at which text is drawn. Angle is measured in degrees from
a horizontal line with positive angles moving toward up. 0 degrees is
horizontal left to right and 90 degrees is vertical bottom to top.
- Size
Specify the text size
Syntax: SIze <inches>
Changes the size of the characters printed in a LABEL or PLACE command. The
size is spcified in inches. (Warning - this is a common place to conflict
with GENPLOT since SIZE has a very different meaning within GENPLOT)
- Spacing
Specify the interline spacing for text
Syntax: SPACing <units>
Sets the interline spacing for text, in units of one character height. Using
the tilde, '~', at the end of a line in Label will cause Label to place that
text, move to a new line and request more text. This spacing is used between
the lines.
- Other
Other commands within ANNOTE.
These commands are general and may be applicable to either text or line
drawing modes.
- Cursor
Find the coordinates that Annotate would need
Syntax: CURsor
Gives the absolute position of the cursor in inches. The coordinates given
are appropriate for the DRAW and TEXT commands within ANNOTE. The cursor
position report will be given when a key is pressed. If the key is either
the space bar or a 0, the cursor will be retained. Otherwise, control is
returned to the ANNOTE sub-process.
- Help
List the Annotate commands
Syntax: HELP
Lists out all commands recognized at ANNOTE sub-level. Effectively the ?
command.
- Return
Return to normal GENPLOT mode
Syntax: RETurn
Returns to normal GENPLOT mode from Annotate mode. This return can also be
accomplished by a carriage return on a blank line. Any errors or commands
with bad syntax will also place the user back into normal GENPLOT mode.
- Coordinates
Specifying coordinates
Most of the ANNOTATE commands require coordinates for either where to place
something or for several coordinates for drawing line segments between such
points. All coordinates in ANNOTATE are currently measured in inches (scaled
by the SHRINK factor) rather than user coordinates.
Coordinates may be entered either directly as numbers, or by placing the
cursor at an appropriate position. If no value is given at a request for
coordinate (i.e. press <CR> to the prompt for a coordinate set), the cursor
will appear and the coordinate will be taken from the screen. Many commands
require more than one coordinate set (such as a LINE draw). Once the cursor
is enabled, all points must be entered from the cursor. Likewise, once the
first number has been entered manually, all remaining values must be typed
rather than using the cursor. In-line, the character "/" indicates a request
for a cursor rather than numeric input.
Examples: LABEL / 'This is a test' Brings up the cursor for placing
the text on screen
LABEL 1.0 2.8 'This is a test' Draws the text at 1.0 inches X
2.8 inches Y.
- ANNote --- Subprocessor for labelling plots (synonym)
Sub-process to annotate the plot with text, symbols and designs, see ANNOTATE
Syntax: ANNOTE [SUB-PROCESSOR]
Enters Annotate mode, see ANNOTATE
- Characters sets --- Default character set definitions
Available character sets
Select characters sets via CHRSET command or inline with strings
Set Font Set Font
--- --------------- --- ---------------
0 Special Symbols 5 Old English
1 Normal Roman 6 Greek (letter equiv)
2 Normal Greek 7 Bold Greek (letter equiv)
3 Bold Roman 8 Script
4 Bold Greek 9 Bold Script
Greek character sets 2 and 4 are in the natural order mapped directly onto the
letters A-X. Sets 6 and 7 are a letter equivalent mapping onto English A-Z.
The specific listings for set 0 (special symbols) and the greek sets are
provided on the previous help level.
The character set may be changed using the CHRSET command or within a given
string using the ^Fn imbedded command. See help at previous level on imbedded
commands for more information.
The number of character sets actually defined depends on which version of
HDATA.CHR has been loaded. See the manual appendix on run-time parameters
to revise the load.
- Greek character --- Mapping of greek characters onto English
Specific mapping of the greek characters
Mapping of the Greek characters on character sets 6 & 7
The greek characters in sets 2 and 4 are arranged in the natural order of the
language and mapped linearly onto the letters A-X. Since few of us actually
speak greek, sets 6 and 7 attempt a "letter" equivalent mapping onto the
English language, using all A-Z with J and V undefined. In the mapped set,
omega, for instance, is W since it looks like a W.
Sets Sets Sets Sets Sets Sets
2&4 6&7 2&4 6&7 2&4 6&7
------------------------------------------------------------------------
A alpha alpha | J kappa ---- | S tau sigma
B beta beta | K lambda kappa | T upsilon tau
C gamma chi | L mu lambda | U phi upsilon
D delta delta | M nu mu | V chi ----
E epsilon epsilon | N xi nu | W psi omega
F zeta phi | O omicron omicron | X omega xi
G eta gamma | P pi pi | Y ---- psi
H theta eta | Q rho theta | Z ---- zeta
I iota iota | R sigma rho |
- Special symbols --- Mapping of special symbols onto keyboard
Specific mapping of the special character set
Definitions of the symbol set 0
Sym Description Char Symbol Char Symbol Char
# used used used
------------------------------------------------------------------------------
1 open circle ! | minus / | sqrt ?
2 open triangle " | plus 0 | partial @
3 cross # | plus/minus 1 | gradient A
4 x symbol $ | minus/plus 2 | integral B
5 open diamond % | times 3 | path integral C
6 open star & | centered dot 4 | infinity D
7 filled square ' | division 5 | Continued product E
8 filled circle ( | equals 6 | Summation F
9 filled triangle ) | not equal 7 | alternate epsilon G
10 left triangle * | identical eq 8 | alternate theta H
11 asterisk + | less than 9 | alternate phi I
12 right triangle , | greater than : | normal degrees J
13 filled star - | less or = ; | bold degrees K
14 star of David . | greater or = < | normal Angstrom L
| proportional = | bold Angstrom M
| sim > | bullet N
- Inline commands --- Super/subscripts, pen & font change codes
Commands within a string to specify superscripts/subscripts etc.
Inline commands for use within strings to control pen color, fonts etc.
Font and pen changes:
^n - change to character set n (n is any valid integer 0-9)
^Fn - change to character set n (n is any valid integer 0-9)
^Pn - change to pen color n (n is any valid integer 0-9)
Superscripting and subscripting text:
^{this} - superscripts the text enclosed in {...}
_{that} - subscripts the text enclosed in {...}
Special operations:
^- - backspace over previous character
\[char] - quote next character. \^ draws the ^ character
Notes:
1) These imbedded commands may be used on any string specification
including axis labels, identifers and text strings to ANNOTE.
2) Invalid fonts or pen color requests are probably ignored.
3) Subscripts and superscripts are displaced and shrunk from the current
symbol sizes. The magnitude and displacement may be changed using the
SGRAPH command. Subscripts or superscripts may be arbitrarily nested.
4) The ^~,^=,^+,^` still work but are considered obsolete. Do not use.
- Examples
Examples of complex strings using imbedded commands
Label Command Examples
SiO_{2} Chemical symbol for silicon dioxide
Si_{3}N_{4} Chemical symbol for silicon nitride
Temperature (^F0K^F1C) Use of font change to get degree symbol
^F0?^F6p^F1Dt/ln(^F6a^F1) Sqrt(pi*D*t)/ln(alpha)
^F6a^F1^{2}^-_{Si_{3}N_{4}} alpha squared of Si3N4
^F6a^F1^{2}^-^p2_{Si_{3}N_{4}} alpha squared of Si3N4 w/ Si3N4 in pen 2
- Special characters --- TeX characters specifications
The following escape sequences may be used to specify special symbols in
text strings. These follow the TeX format convention, but do not distinguish
between math and normal modes. In addition, super and sub-scripts MUST
be enclosed in {} to be recognized (compatibility issue).
- Special characters, subscripts, superscripts, pens and colors:
\deg Degree symbol (small circle used w/ Centigrade)
\AA Angstrom symbol
\bullet Bullet symbol
\circ Circ symbol (small circle)
\n New line command (may or may not be recognized)
\r Carriage return (to start of drawing range)
\b Backspace command
\pen<n> Set pen to <n>
\color<n> Set pen to <n>
_{text} Subscript the text
^{text} Superscript the text
{block} Isolate font changes within the braces
\{ Insert { as text
\} Insert } as text
\bra, \ket Symbols for < and > (crystallography or QM bra-ket)
\approx The uppercase version (\Approx) is bold
- Font, pen color, etc. changing commands:
\bold \greek \script \gothic \it \bf
\ital \italics \plain \rm \normal \unbold
- Greek characters. Both the upper and lower case are available for
each entry. Specify lower alpha as \alpha, upper alpha as \Alpha.
\alpha \beta \gamma \delta \epsilon \zeta
\Alpha \Beta \Gamma \Delta \Epsilon \Zeta
\eta \theta \iota \kappa \lambda \mu
\Eta \Theta \Iota \Kappa \Lambda \Mu
\nu \xi \omicron \pi \rho \sigma
\Nu \Xi \Omicron \Pi \Rho \Sigma
\tau \upsilon \phi \chi \psi \omega
\Tau \Upsilon \Phi \Chi \Psi \Omega
\varepsilon \vartheta \varphi
- Special mathematical symbols:
\partial \grad \int \oint \infty \prod
\sum \minus \plus \pm \mp \times
\cdot \div \eq \ne \equiv \lt
\gt \le \ge \propto \sim \sqrt
- Symbols used in graphs - filled versions occur as caps:
\box \circ \triangle \diamond \star
\Box \Circ \Triangle \Star
- C strings --- Handling of escape sequences in character strings
There are several complications arising from the use of the
backslash character in strings - which unfortunately will not
generally go away. The C language escape characters are very
useful, and indeed necessary, for the printf functions. But
they make use of special strings and paths very difficult.
(how to specify Microsoft paths, how to get \beta chars).
So, there are two types of string constants.
Regular string constants - no escape constants
C string constants - full escape constant processing
A string is taken to be a C string constant if it is enclosed
in "" and the first character is a `.
In C string mode, the \ character identifies an
escape character to follow -- with the following recognized.
\a -> alert (bell sounds)
\b -> backspace
\f -> formfeed
\n -> newline
\r -> carriage return
\t -> horizontal tab
\v -> vertical tab
\\ -> backslash
\xbb -> hexadecimal constant where b is [0-f]
\ooo -> octal constant where o is [0-7]
Any other character returns just the character, so \w is
identical to w.
To force a regular string beginning with the ` character,
use it twice. This will disable the C string processing.
"``0.834\beta" gives the string `0.834\beta
"`\`0.834\beta" gives the string `0.345eta
Allocate or set variables and functions
GENPLOT includes an extremely powerful and versatile expression and function
evaluator, allowing the user to transform, scale and analyze data in an
endless variety of ways. At one level, the expression evaluator is invoked
anytime a number is requested by GENPLOT (including reading data from an ASCII
file). For example, the REGION command may be given as "REGION BOTTOM @MIN(X)
2*SIN(PI/8)". Legal expressions may include constants, pre-defined variables
and functions, and user defined variables and functions (including your data).
Allowed mathematical operations include all of the basic algebraic operations,
most of the useful intrinsic functions, and a complete set of relational and
logical operators.
In addition to simple constant evaluation, the function evaluator handles the
allocation of memory for local variables, strings and functions for local use.
Variables and functions are required, for example, to use the non-linear
fitting capability of GENPLOT. Each of these capabilities are described
below.
- EVALUATE -- Evaluate a general math expression and print result
Syntax: EVALuate <expression>
EVALUATE is used to evaluate a real or complex arithmetic expression and print
the result to the terminal. The expression may include any legal combination
of functions and variables. Since <expression> is read as a single token, it
cannot contain spaces unless it is enclosed in quotes or in parentheses. If
the <expression> is an array, the entire array is printed, otherwise only a
single number is printed. Array expressions may be printed using the
"DO REPEAT" command.
The following are legal given XTEMP as a real and F(X,Y) as a function.
EVAL 2.5*XTEMP EVAL 'y(17) + y(x(13))'
EVAL F(SIN(PI/3)*XTEMP,COS(F(1,0))) EVAL @SUM(Y)
EVAL (XTEMP.LT.3).OR.(F(XTEMP,0).GT.8) EVAL @MAX(Y)*@MIN(Y)*@AVE(X)
EVAL (XTMP<=3).OR.(F(XTMP,0)>8) EVAL SIN(2.8)*(F(X(13),Y(2))>=3)
The following are illegal:
EVAL 2.5 * SIN(pi/3) No spaces allowed in expression
EVALUATE F(1) Garbage results since only 1 arguments for F
See also: LET SETV DEFINE
- LET
Set a variable to a constant or expression
Syntax: LET <var>[,var2,...] = <expression> [<expr2> ...]
LET assigns the value specified by the expression to a variable, string or
allocated array (For curves See CREATE under H. Analysis). It does so in
the most useful manner given the form of the variable and the expression.
The expression is a single token and must contain no spaces unless enclosed
in quotes. Array variables may be indexed to refer to only a single element.
LET is commonly used as the most general form of data transformations.
var == real or integer | Evaluate <expression> as a number and set value
var == string or function | Just copy <expression> to string - no size check
(this is not recommended. Use DECLARE or DEFINE)
var == array | Apply <expression> as a vector operation. If
<expression> is constant, all elements will be
assigned the same value. Array elements within
expression will be indexed appropriately.
Example: LET theta = 27 LET X = 27 (entire array)
LET X(17) = 17 (single element) LET Y = 2*SIN(Y)*COS(X)*ATAN(XTMP)
LET Y = 'G(X) + F(X)' LET I1 = I1+1
Errors: If <var> has not been allocated (see SETV or ALLOC), LET will generate
an error message. Use SETV in that case to allocate and set value.
See also: CREATE
- SETVAR -- Allocates a real variable and set it to an expression
Syntax: SETVar <var>[,<var2>,...] = <expression> [<expr2> ...]
SETV is the simplest method for defining a real constant. If <var> is
previously defined as something other than a REAL constant, the previous
declaration will be deleted and a warning will be printed. If <var> is not yet
defined (by a previous SETV or ALLOC for instance), SETV will alloc <var> as a
real variable. SETV then does an equivalent of LET to assign a value to the
variable.
CAUTION: In GENPLOT 1.0, SETVAR would never change the type of the variable.
This is an intentional change in behavior.
Examples: SETV theta 0.0 | Allocate a "THETA" variable
SETV beta = temp/8.3144 | Allocate "BETA" and set value
SETV beta = beta | Make sure BETA exists. If not,
its value after this is 0.0.
SETV string = 'Hi there' | Only works if string was DECLARED
or ALLOCATED before as a STRING.
SETV Y = F(X) | Can be used to emulate LET also
- DEFINE -- Define a user function of one or more variables
Syntax: DEFINE < function(dummy1 [,dummy2 ...] ) > = <string expression>
User functions may be declared and nested to an almost arbitrary level. The
arguments within the <function> are considered dummies and are replaced at
evaulation time with the appropriate given values. FUNCTIONS MUST BE DECLARED
BY THIS METHOD in order to have the dummy arguments handled properly.
Functions may contain other function and variable references as long as no
circular expressions are created. CIRCULAR expressions will most certainly
crash the OS (such as DEFINE DOT(X) = DOT(X)).
Consider the request: "DEFINE DOT(X,Y) = MIN(X,Y)/MAX(X,Y)". The command
allocates a string variable DOT of an appropriate length. The expression is
copied to the string variable except for dummy arguments which are translated
to &1, &2 to correspond to their place holders. Evaluation of DOT(1,2)
will result in evaluating MIN(1,2)/MAX(1,2) = 0.5.
Examples: DEFINE F(X) = SQRT(SIN(X)) V(TIME,SPACE) = SPACE/TIME
DEFINE G(Z) = ERFC(Z) N(USERS) = @SUM(USERS)
DEFINE H(X,Y) = G(F(X))+F(G(Y)) etc. etc.
- DECLARE -- Define a string variable and set its value
Syntax: DECLARE <var> = <string expression>
DECLARE allocates a string variable of the necessary length and sets it to
the <string expression> value. This is normally used in conjunction with the
automatic expansion of strings to create variable to command arguments.
The <string expression> must be enclosed in quotes if you want it to contain
lower case or blanks. String expressions may be used at almost any time in
the command line by enclosing the name with % characters. %var% is replaced
at parse time with the current value of the variable (as a single token).
Examples are best here.
Examples: DECLARE t_bot = 'A bottom title' | Sets string t_bot
TITLE BOTTOM %t_bot% | And tells title to use it
DECLARE t_top = 'A top title' | Declare a second one
TITLE TOP '%t_top% next to %t_top% | Take a guess!
DECLARE t_bot = 'A' | Titles will not change since
evaluation already done
Declaration of strings are most useful in conjunction with general macros
where arguments may be passed as variables.
- ALLOCATE -- Allocate memory for a named variable or array
Syntax: ALLOCate <var> [ Real | COmplex | - Simple REAL/COMPLEX variable
Integer | - Simple integer variable
Real ARRay <n> | - REAL array (element 0 to n-1)
COmplex ARRay <n> | - COMPLEX array (0 to n-1)
Array <n> | - REAL array (0 to n-1)
C_Array <n> | - COMPLEX array (0 to n-1)
String <len> | - String of initial length <len>
CUrve <npt> | - 2d curve (initial size npt)
2D {CURve} <npt> | - 2D curve (initial size npt)
3D {CURve} <npt> | - 3D curve (initial size npt)
Surface <row> <col> - Surface 3D structure
]
Simple variables and arrays are set to 0 and strings are empty. Size is
limited by your patience and swap-space <grin>. REAL is a 32 bit float.
Examples: ALLOC JUNK REAL ALLOC COUNTER INTEGER
ALLOC C1 CURVE 1024 ALLOC FINAL ARRAY 16000
- Advanced -- Internal structures of compound variables
For complex structures such as curves, multiple elements will be defined for
structure elements. This are hidden variable and include:
2D,3D - allocates <var>:x <var>:y <var>:z <var>:npt
SURFACE - allocates <var>:x <var>:y <var>:z <var>:ncol <var>:nrow
For curves, the variable itself is actually a string variable which can
be set to identify the curve. Direct manipulation of the internal structures
is happily allowed (which means you can crash yourself with ease <grin>).
Please be careful increasing npt beyond the actual size defined.
Some variables (curves in particular) can be increased in size to accomodate
some operations (such as let, create or read).
- DEALLOCATE -- Release memory currently assigned to a variable
Syntax: DEALLOCATE <name>
DEALLOCATE releases all of the memory associated with a variable, curve, array
function or string. It is PERMANENTLY lost and undefined. Deallocation may
help if you need to undo an unexpectedly large ALLOCATE, and find yourself
running low on swap-space. Fortunately the days of having to deallocate to
live within DOS's 640 kB limit are long gone.
Example: ALLOC c1 CURVE 1024 | Allocates 8192 bytes for 1024 pt curve
DEALL c1 | Releases the 8192 bytes for other uses
- LISTVARS -- Lists all or a subset of currently defined variables, function, curves etc.
Print out variables defined and current values.
Syntax: LISTVar [-Integer] [-Reals] [-COmplex] [-Arrays] [-Vars]
[-Strings] [-Text] [-Functions] [-Curves] [-SUrfaces]
[-HIDden] [-Modules]
LISTVar [-acfhimrstvz] -c -> curves -z -> complex
-s -> surfaces -t -> text strings
LISTV lists out all defined variables with values (unless arrays or curves).
Type of variable and the defined length are given. For curves, only the CURVE
name is shown (but not :X :Y and :NPT elements).
The LISTING may be limited or expanded to include subsets of variable types
by specifying one of the switches such as -CURVES. The alternate option form
may also be used (-hv is expanded to -hidden -vars). Specifying -hidden
causes all variables to be shown, including internal variables. Internal
GENPLOT names either begin or end with a $. Those beginning with the $ are
internal variables; those ending with a $ are results of calculations.
EXAMPLES: LISTV | Lists all variables defined.
LISTV -FUNCTION | Lists only defined functions
LISTV -VARS -HIDDEN | Lists variables including hidden ones
- SAVEVARS -- Writes macro file of current variables and functions
Syntax: SAVEVARS <file_name> [-FUNCTIONS | -VARS | -STRINGS | -CURVES]
Synonym: WRITEVARS <file_name> [-FUNCTIONS | -VARS | -STRINGS | -CURVES]
This commands does a LISTV command to a disk file, generating a macro which
will reallocate and define all functions, variables, arrays and strings. It
unfortunately, however, will not save values of arrays or curves; only simple
variable's values will be written to the disk file.
To re-establish the environment when re-entering GENPLOT, simple XEQ the file
written by SAVEVAR.
Example: SAVEVAR RESTART -FUNCTIONS | Save functions to file RESTART
XEQ RESTART | Load in variables in file RESTART
- {operations} -- Allowed mathematical and relational operations
Standard FORTRAN expression are allowed with two extensions.
1. The relational operators have symbolic synonyms such as >=.
2. Logical and numeric operations may be combined. FALSE is defined as
0.0 and TRUE is 1.0; any expression greater than 0.0 is TRUE.
Hierarchy: ! ** or ^ - Factorials and exponentiation
- - Unary minus
* / - Multiplication and Division
+ - - Addition and subtraction
.GT. .LT. .GE. .LE. .EQ. .NE. - Relational operators
> < >= <= == <> - (synonymous)
.NOT. - Logical operators
.AND.
.OR.
.EQV. .NEQV.
Examples: SIN(X)*(X.LT.3).OR.(Y>=7.2) SIN(X)*(X.GT.0)
'(X .LT. Y) .or. (Y .LT. 1.0) .and. (X*Y .GT. 0)'
- {functions} -- Predefined mathematical functions and constants
Intrinsic functions known to the GENPLOT interpreter.
Constants:
E: 2.718281828 PI: 3.141592654 J: sqrt(-1) I: array index (reserved)
- Basic arithmetic: ABS SQRT POW LN LOG EXP INT NINT FRAC SIGN
Helpful arithmetic functions
abs(z) absolute value of z
sqrt(z) square root
pow(z,m) raise to power x^m
ln(z) natural logarithm (base e)
log(z) common logarithm (base 10)
exp(z) exponentiation (base e)
int(z) integer truncation z (real part)
nint(z) nearest integer to z (real part)
frac(z) fractional part of z (real part)
sign(z) sign - returns +1, 0 or -1
fabs(z) absolute value of z (alternate name)
magn(z) absolute value of z (alternate name)
- Basic math: MOD M1N FACT CEIL FLOOR LDEXP ROUND
Basic math
min(z,...) minimum of a list (magnitude for complex)
max(z,...) maximum of a list (magnitude for complex)
mod(x,y) modulo - result is in range (-y,y) with same sign as x
fmod(x,y) alias for modulo
m1n(n) minus 1 to the nth (-1^n)
fact(z) factorial of z (z! alternate form)
ceil(z) smallest integer >= z
floor(z) largest integer <= z
ldexp(x,i) load binary exponent - x*2^i
round(x,i) Round x to i decimal points - round(2.372,1) = 2.4
- Trig: SIN ... SIND ... ASIN ... ASIND ... ATAN2 ATAN2D
Trigonometric functions
sin(z) cos(z) tan(z) cot(z) radian based arguments
sind(z) cosd(z) tand(z) cotd(z) degree based arguments
asin(z) acos(z) atan(z) acot(z) returns radian value
asind(z) acosd(z) atand(z) acotd(z) returns degree value
atan2(x,y) atan2d(x,y) inverse tangent of x/y
- Hyperbolic trig: SINH COSH TANH ASINH ACOSH ATANH
Hyperbolic functions and their inverses
sinh(z) (e^z-e^-z)/2
cosh(z) (e^z+e^-z)/2
tanh(z) sinh(z)/cosh(z)
asinh(z) inverse sinh(z)
acosh(z) inverse cosh(z)
atanh(z) inverse tanh(z)
- Complex support: REAL IMAG CONJ ARG MAGN
Functions that support complex arithmetic
real(z) return real component of complex number
imag(z) return imaginary component of complex number (as a real)
conj(z) complex conjugate
arg(z) angle (radians) of x+iy -> r*exp(j*theta)
magn(z) magnitude of x+iy -> r*exp(j*theta)
- Bessel: J0 J1 JN Y0 Y1 YN
Bessel functions
j0(x) Bessel function of zero order
j1(x) Bessel function of first order
jn(n,x) Bessel function of arbitrary order
y0(x) y1(x) yn(n,x) Alternate Bessel functions
WARNING: Not all compiles support the Bessel functions. But the useful
ones seem to so they are included in the documentation.
- Probability functions: RND SRANG GAMMA LNGAMMA ERF ERFC NDTR NDTRI
Probability functions
rnd() Random number in (0,1)
rand() Random number in (0,1)
srand(x) Set seed for random number generator to x
gamma(z) Gamma function (please don't try negative integers)
lngamma(z) Natural log of the Gamma function
erf(z) error function (integral of Gaussian)
erfc(z) complementary error function (1-erf)
ndtr(z) Normal distribution
ndtri(x) Inverse of normal distribution
The expression ndtri(rnd(x)) creates a random normally distributed value.
This can be used in various operations such as adding noise to a faked data
set before passing to the boss.
let y = nint(y+sqrt(max(1,y))*ndtri(rnd(x)))
will, approximately, add counting statistics error to a data set.
- Probability distributions: HV$ GAUSS POISSON BINOMIAL LORENTZ EDGEWORTH
Probability functions
hv$(x) Heaviside operator 0 x<0, 0.5 x=0, 1 x>0
gauss(z,x0,sigma) Gaussian distribution = exp(-(z-x0)^2/sigma^2)
gaussian(z,x0,sigma) Gaussian distribution
poisson(z,x0) Poisson distribution = (x0^x/x!)*exp(-x0)
binomial(x,n,p) Binomial distribution = C(n|x)*p^x*(1-p)^(n-x)
lorentz(z,x0,width) Lorentz distribution = [w/2]/pi/{(x-x0)^2+(w/2)^2}
edgeworth(x,x0,sigma,skew,kurt) Edgeworth distribution (ion implantation)
pearson_IV() Not implemented yet, but reserved
pearson_VI() Not implemented yet, but reserved
- Array operations: @AVE @MAX @MIN @RMS @STD @SUM @SKEW @KURT @ABSMIN ...
Functions that operate on arrays
@ave(ar) Average of array
@avg(ar) Average of array
@mean(ar) Average of array
@median(ar) Median of the array
@max(ar) Maximum of array - also sets $I to index of max
@min(ar) Minimum of array - also sets $I to index of min
@sum(ar) Sum of array elements
@absmin(ar) Minimum of absolute value - also sets $I
@absmax(ar) Maximum of absolute value - also sets $I
@abssum(ar) Sum of absolute values
@rms(ar) Root mean squared deviation
@std(ar) Standard Deviation of array
@span(ar) Span of array (max-min)
@range(ar) Span of array (max-min)
@skew(ar) Skew of array
@kurt(ar) Kurtosis of array (a normal distribution will yield 0)
- Curve operations: @integral @correlate
Functions that operate on curves returning single value
@integral(cv) Simple integral under the curve
@correlate(cv) Simple correlation coefficient between x & y
The main curve is initially called $PLOT. Hence the correlation of the
main curve can be obtained by "eval @correlate($plot)".
- Cubic Splines: SPLINE DSPLN DDSPLN SPLINE2 DSPLN2 DDSPLN2
Evaluation of cubic splines, after using "fit spline"
spline(z) spline evaluated at x, based on SPL$DATA array
dspln(z) spline derivative, based on SPL$DATA array
ddspln(z) spline second derivative, based on SPL$DATA array
spline2(z,spl) spline evaluated at x, based on data in array structure spl
dspln2(z,spl) spline derivative, based on data in array structure spl
ddspln2(z,spl) spline second derivative, based on data in array structure spl
The internal structure of the spline array is undocumented. However, the
array can be duplicated and used in the SPLINE2 formats. Example:
fit spline
alloc sp array sizeof(spl$data) /* Creates blank array of correct size
let sp = spl$data /* Copy the data
eval spline2(x,sp) /* Uses the sp spline structure
- Polynomials: POLY TN CHEBY
Polynomial evaluations
poly(z,ar) ar(0)+ar(1)*z+ ... +ar(n-1)*z^(n-1)
tn(n,z) Chebyshev polynomial of order n
cheby(z,ar) sum(ar(i)*tn(i,z)) (implemented with Clenshaw's recurrence)
- System utils: TIME SIZEOF TYPEOF
Miscellaneous functions
time() Seconds since epoch (normally 00&colon.00&colon.00 Jan. 1, 1970 UTC)
sizeof(any) Number of items in a variable/array
typeof(any) Type of variable/array (not useful except to authors!)
- {complex} -- Rules and syntax for complex numbers and arithmetic
Complex numbers can be specified in two forms. Because i has historically
been an array index, its use can be ambiguous in constants. Use of a+bi is
permitted as long as b is not an implicit 1. The symbol j can be used in
place of i and is always valid.
7+4j 7+4i 4.37i - simple constants
7+1i 1i j - i must have constant 1 to identify as complex id
7+4*j - j recognized okay, i would fail
Most functions (complain to authors if others needed) handle complex args with
complex results. Use of real-limited functions generate nasty error message
if the argument has a non-zero imaginary component, but succeed otherwise.
The expression evaluator drops into complex mode only when need is recognized,
via complex constants, complex variables, or complex only functions.
Alternatively, the MATHMODE command can be used to force complex evaluation.
sqrt(-1) - will fail since no complex promotion detected
sqrt(-5+0j) - will succeed since 0j forces to complex mode
NLSFIT, PRINTF (use %z format), and SETVAR are complex aware.
- MATHMODE -- Mode setting relevant for evaluating arithmetic expressions
Syntax: MATHMODE [ COMPLEX | REAL | REALONLY | DEFAULT |
BRanch {+ | - | pos | neg } | STatus | HELP | ? |
DEBUG | NODEBug | Warninglevel <n> ]
REAL: [default] Complex numbers are only used if something in the
expression requires complex numbers to make sense - use of
complex variables, complex constants, or functions like real()
or imag(). In this case, sqrt(-1)=error, but sqrt(-1+0j)=-1.
REALONLY: Guess
COMPLEX: Force all calculations to be done in complex mode. Some
functions may fail if no comparable complex function exists.
However, in this case, sqrt(-1)=0+1j.
BRANCH -: [default] Complex branch cut is along the negative real axis.
BRANCH +: Complex branch cut is along the positive real axis.
WARNING <n>: How many message levels to be printed (0-4, default 3):
1 - fatal errors 2 - errors 3- warnings 4 - info messages
- {limits} -- Limitations to the function evaluator
The function evaluator has few restrictions or limitations. If you exceed the
limits, you probably need to write a program. Some limits are checked, but
most assume user intelligence. Heaven help if you fall outside this group!
STACK: 200 pending operations. Translated, trouble if you there are more than
200 closed parenthesis together. (Early HP calculators had a 4 stack!)
All other structures in version 2.0 of GENPLOT are designed to grow as
needed for almost any expression. We've tested it with some really
ugly ones, but I don't doubt someone will find a way to overflow it.
(PS: define f(x) = f(x) eval f(2) does not count.)
FAILURES: May not be handled gracefully! Overflow, divide by zero and the
like are treated by "do something and continue". NAN (not a number)
may be returned which will really upset GENPLOT. The evaluator may
also evaluate some nonsense expressions. DON'T DO THAT EITHER!
RESERVED: The variable names i, j, e, and pi are reserved within the
function parser. Don't try to redefine them if you want to live.
Using macro command files
Macros - Files containing prewritten GENPLOT command sequences
A macro is basically a DOS ASCII file which contains a series of GENPLOT
commands, much like a subroutine in a programming language. Executing the
macro causes GENPLOT to take command input from the file instead of from the
console. Commands in the macro file behave exactly as the same command typed
at the console. Macros are often written to perform a particular analysis, or
as building blocks for complex publication plots. An example of one macro
file is GENPLOT.INI which is used to customize the GENPLOT environment during
initialization. Any DOS file may be considered a macro file and executed.
Nesting of macros is limited to a maximum depth of 5. Several commands not
normally used at command level allow parameters to be passed from one macro to
the next and to provide flow control. Additional commands are provided to
write and save temporary macros from the console (using EMACS is a better
option though).
- Xeq -- Execute a macro file or return from the currently executing macro
Syntax: Xeq [<file name> | NOW | -RETURN | -TTY ]
The XEQ command causes GENPLOT to take commands from the specified file. XEQ
may be called from console level or from an executing macro file. The file,
with a default .MAC extension, is searched for in the current directory and
the directory specified to the BASE_MACRO command. The special form of this
command, XEQ NOW, causes program control to be transfered to the temporary
macro created by the MACRO command. XEQ files may be nested to a maximum
level determined at compilation time (typically 5). An attempt to nest deeper
results in an error message and the aborting of all currently active macros.
Errors occurring during execution cause the macro to pause. The remainder of
the current command line is always deleted. The user may then either continue
execution with the next line or abort the current macro. If an aborted macro
was called from a macro, the abort/continue question will be asked at each
level until the console level is reached.
Special: XEQ -RETURN ==> Return from this macro back one level
XEQ -TTY ==> Terminate all macros and return to console level
Example: XEQ read_data MOT.DAT
XEQ -RETURN
- CALL -- Execute a macro file or return from the currently executing macro --- SEE XEQ
Syntax: CALL [<file name> | NOW | -RETURN | -TTY ]
Execute a macro file. See the synonym XEQ for additional information.
- BASE_Macro -- Specify a default macro directory
Syntax: BASE_Macro <directory>
Commonly used macros may be grouped together in a given subdirectory. This
command directs GENPLOT to search in a specified subdirectory for any macros
that is not found in the current directory. The current directory is always
searched first.
Example: BASE_MACRO \GENPLOT\MACROS
XEQ JOHN.SET
The second command will either execute .\JOHN.SET or \GENPLOT\MACROS\JOHN.SET,
whichever is found first. JOHN.SET might be an initialization file JOHN
always wants executed when he runs.
- Echo -- Toggle the command display while a macro is running - or print text
Syntax: ECHO {OFF | ON | text}
The first two forms of the ECHO command, ON and OFF, are used within macros to
control echoing of commands to the screen. Commands executed from a macro
file are normally echoed to the screen (underlined) as executed, allowing one
to follow the program and to determine if and where errors occur. Once a
macro is debugged, this command echoing is usually unwanted, especially for
long macros. ECHO OFF turns the feature off and runs command files silently.
I recommend setting ECHO OFF at the beginning of each macro file and ECHO ON
at the end.
The last form of the command allows a macro to give progress reports during
execution. If the token following an ECHO command is neither ON nor OFF, the
entire remainder of the command line is echoed as a comment to the console,
independent of the current ECHO status. Macros which take a considerable time
to run should use the ECHO command to keep the user informed of progress (if
any).
Example: ECHO OFF
ECHO ON
ECHO Hey Mark! - Don't shut me off. I'm trying the convolution.
- Query -- Prompt the user for input from a macro
Syntax: <prompt> <defalut> <variable>
QUERY gets information from the console and assigns the result to a string.
&QUERY is generally a better command to use.
- Macro -- Collect commands into a temporary macro file
Syntax: MACro
This command opens a temporary file and collects a series of commands into the
file. The commands are only stored by this command and are not executed.
Once the macro file is open, all lines typed at the terminal are copied into
the file, including blank lines and comments. Only single line editing is
allowed. The file is closed with the system EOF character (^Z on the PC).
The commands stored in the temporary macro may be executed using the XEQ NOW
command. NOW always refers to the currently defined temporary file. If you
want to save the macro, use SAVE_MACRO to store the macro to disk under a
useful name.
Example: GENPLOT: MACRO
: READ %file% let x = x/y let y = my_function(x,y)
: plot -lt 0 -sym 3
:^Z
GENPLOT: declare file = 'run1.tst' xeq now
NOTE: The EMACS command makes MACRO and SAVE_MACRO essentially obsolete.
- SAVE_Macro -- Save the commands from a temporary MACRO to a specified file
Syntax: SAVE_Mac <file name>
The SAVE_MACRO command attempts to rename the temporary file opened with a
MACRO command to a user specified file. This command can only rename the
temporary file created by the MACRO command. The temporary file becomes
undefined following this command.
- IF -- Conditionally execute the remainder of the command line
Syntax: IF (condition) command_list
The IF command allows branching and conditional execution on test of an
arithmetic statement. If the "condition" is true, the remainder of the
command line is executed. If false, the command line is flushed and execution
continues with the next line in the macro file. The "condition" is evaluated
as a numerical function. Any value less than or equal to zero is considered
false while positive values are true. Logical operators may be used as well.
Example: if (@min(x).lt.-100) then cull delete for (x<200)
if (npt.lt.5) goto error_1
- GOTO -- Causes program execution to jump to the specified label
Syntax: GOTO <label>
The GOTO command allows direct branching within a macro file to a specified
label. Any line in a macro which begins with the : character defines a label.
The label consists of the characters immediately following the colon up to the
first space. The remainder of a label line is always ignored - only the label
is significant. The GOTO statement causes exectution to continue from the
FIRST label in the macro which matches.
WARNING: The GOTO command is relatively slow. The current macro file is
positioned to the beginning and the label is searched for line by line.
Implementation of DO loops with large limits using the GOTO statement should
only be done in separate macro files or at the top of a large macro file.
Example loop:
setv inc = 1 setv sum = 0.0
:loop
let sum = sum+x(inc)
let inc = inc+5 if (inc .lt. npt) goto loop
xeq -return
- FOR %F -- Repeat a command line for a specified item list
Syntax: FOR %f IN (item1 item2 item3 wild1 ...) DO {command sequence %f %c}
The FOR %F command (and it's friend FOR REPEAT) is a powerful repeat processor
similar to the FOR command available under DOS. The command is composed of
two distinct items in a rigid syntax, the item list and the command list. The
syntax must be exactly "FOR %F IN (item_list) DO command_list". The item_list
must be enclosed in parenthesis and consists of an arbitrary number of single
tokens or wildcard filenames. The command_list is all tokens following the
terminal DO of the syntax and may include any valid GENPLOT commands except
another FOR command.
Any item in the item_list which contains either a * or ? is assumed to be a
wildcard. For each item in the list or file matching a wildcard in the list,
the command_list is executed. Execution terminates either on an error or when
the item_list is expended.
During execution of the FOR command, the special tokens %F and %C are defined
and may be used in the command_list. %F is replaced with the item from the
item_list or the current filename if the item was a wildcard. %C is a three
character number starting at 001 which is incremented each time the
command_list is executed. The count is reset to 001 at the start of the FOR
command but is not reset on each new wildcard item.
Examples: FOR %F IN (*.*) setv j = %c
FOR %f in (*.dat *.new) do read %f ov -lt 0 -sym %c -ids
for %f in (01 13 09) do read sim_%f.dat plot title
- FOR REPEAT -- Repeat a command line a specified number of times
Syntax: FOR REPEAT <cnt> DO {command sequence %c}
The FOR REPEAT is a relative of the FOR %F command and is used to execute a
given command a number of times. The format is rigid and both the REPEAT and
the DO must be spelled out fully. The remainder of the command line following
the DO is taken as the command_list. This command_list will be executed the
specified number of times.
During execution command, the special token %C is defined and may be used in
the command_list. %C is a three character number starting at 001 which is
incremented each time the command_list is executed.
Example: let npt = npt-1 for repeat npt do let y(%c) = y(%c+1)-y(%c)
for repeat 7 do overlay curve_%c -pen %c
- &GETARG -- Retrieve an argument from the previous macro or from the user
Syntax: &GETARG [-Prompt <prompt string>] [-Default <default value>]
Arguments may be passed to a macro file using the &GETARG quasi-command. The
&GETARG (and the associated -PROMPT or -DEFAULT) is replaced with the next
token from the command line which called the macro. If no argument is
available on the command line, the user will be prompted to supply the value.
The -DEFAULT allows a default response to be provided if the user answers with
a blank line. The entire line typed by the user is returned as a single
token. Note that the &GETARG is almost never used by itself but rather as an
argument in some other command.
Example: SETVAR filename = &GETARG -PROMPT 'File to read: ' -DEFAULT 'test'
SETVAR file_2 = &GETARG -PROMPT 'Second file: '
SYMBOL &getarg -prompt 'Symbol to use: '
The calling command "XEQ MY_MACRO a.dat b.dat 3" would set filename, file_2
and the symbol without prompting the user. The command XEQ MY_MACRO would
cause the user to be prompted for all three.
- &QUERY -- Query the user for an argument directly
Syntax: &QUERY [-Prompt <prompt string>] [-Default <default value>]
The &QUERY quasi-command is similar to &GETARG except that input is always
taken from the user rather than the calling command line. &QUERY (and the
associated -PROMPT or -DEFAULT) is replaced with the text typed by the user in
response to the prompt. If the user answers with a blank line, the -DEFAULT
is returned. The entire line typed by the user is returned as a single token.
Note that the &QUERY is almost never used by itself but rather as an argument
in some other command.
Example: SETVAR filename = &QUERY -PROMPT 'File to read: ' -DEFAULT 'test'
SETVAR file_2 = &QUERY -PROMPT 'Second file: '
These commands would prompt the user for names to use as filename and file_2.
- &YESNO -- Retrieve the next YES/NO argument from the calling macro and return TRUE/FALSE
Syntax: &YESNO [-Prompt <prompt string>] [-Default <default value>]
The &YESNO command is similar to the &GETARG quasi-command except that it
returns the strings 0 or 1 always, corresponding to NO and YES. Only YES and
NO are allowed as responses to the &YESNO prompt. See &GETARG for more
information.
Example: IF &YESNO -prompt 'Do you want to quit? ' -default YES GOTO EXIT
- &ENCODE -- Encode the specified real number expression into a character string
Syntax: &ENCODE <format> <value>
The &ENCODE quasi-command allows real number expressions to be automatically
converted to character strings, usually for drawing on the plot. The <value>
is any legal numerical expression or constant. The <format> must be a legal
FORTRAN format structure enclosed within parenthesis for a real number.
While &ENCODE can be used as a command, it is almost always used either within
ANNOTE or with DEFINE to set a character string.
Example: DEFINE str1 = &ENCODE (F5.2) pi
The string str1 is set to " 3.14".
- CMDLIN -- Expands a string into the next command
Syntax: CMDLin <text>
After prompting the user for a command you would use this to parse the line.
define user_line = &getarg -prompt 'Enter a command: '
cmdlin %user_line%
- SLEEP -- Sleep for a given length of time before continuing execution
Syntax: SLEEP <seconds>
The SLEEP command causes program execution to be paused for a specified number
of seconds. Program execution then continues with no side effects. The delay
may be used to allow the user to view a intermediate result before the macro
continues to bash the data.
The resolution of this command is limited to approximately .05 seconds and the
maximum allowed delay is 32 seconds. This command should not be trusted for
critical timing delays.
- WAIT -- Wait for user action before continuing
Syntax: WAIT
Executes a FORTRAN PAUSE statement. The actual effect depends on the compiler
implementation. Under Ryan-McFarland F77, execution is halted until the <CR>
key is pressed. This command may be used to stop macro execution for user
intervention, such as turning on the bloody plotter.
- TIMER -- Timer function to determine elapsed time (only for the masochist)
Syntax: TIMER [-START | -RESET]
The timer function allows the masochist or sadist to measure the elapsed time
for execution of a series of commands. The TIMER command prints the current
time and the elapsed time (in seconds) from the last TIMER -START or
TIMER -RESET command.
Example: TIMER -START transform fft -power TIMER
- /* -- Comment specifier. The remainder of the line is ignored
Syntax: /* <some comment>
The /* indicates that the remainder of the command line is to be considered a
comment field. The primary use of /* is to document macro files for the next
unfortunate user. When the /* is executed, the remainder of the command line
is flushed and execution continues with the next command line. Note that
since /* is an actual command, it can only be used when a command is expected.
Example: read ini /* Read the initialization data file
Commands to interact with the operating system, DOS, UNIX, etc.
- <disk>: -- Change default disk
Syntax: {A: | B: | C: | ... | Z:}
Changes the default disk to the specified one, e.g., A: or B: or C:. This is
identical to typing A: at the DOS prompt. Use LS to list files contained on
the disk.
- CD -- Change directory
Syntax: CD <directory>
Changes the current directory, CD C:DATA would make c:data the current
directory. Identical to the DOS change directory command except that you
must specify a directory.
Use WHERE to find out your current directory.
- Memory -- Display free memory and disk space.
Syntax: MEMory
Displays system information (the exact numbers will be for your system):
Memory configured: 640.0 Kb
Memory available: 181.1 Kb
Unused disk space: 7154.0 Kb
Total disk space: 20708.0 Kb
- Where -- Gives the pathname of the current directory.
Syntax: WHEre
Gives the pathname of the current directory.
- LS -- Display directory
Syntax: LS <wildcard>
Provides a listing of the files in a specified directory. The <wildcard>
entry specifies a path and wildcard file specification; the wildcard
characters * and ? may be used in the file specification. The * matches any
number of characters in the name, while the ? matches only a single position.
The format of the wildcard is identical to those allowed in DOS DIR function.
LS provides similar information to the DIR /W command in DOS in a slightly
different format.
Examples: LS Provides listing of current directory
LS *.F77 Only files with the .F77 extension
LS A?BC.DAT Will list files A1BC.DAT, A2BC.DAT etc.
LS D:..\..\JUNK\*.BAT Full pathnames are also allowed.
- DIR -- Display directory (See LS)
Syntax: DIr <wildcard>
Synonymous with LS. See LS for more information.
- Type -- Type a file on the screen
Syntax: TYpe <file name>
Displays the contents of the specified file. Similar to the DOS MORE command.
Once the file starts printing, one screen at time is presented. Press
the <space> bar to see another full screen, or press the <CR> key for a single
line. Exit with <ESCAPE>.
- DOS -- Send a command to the systme to be executed
Syntax: DOS <command>
The remainder of the command line <command> is passed to the DOS processor
for execution. This allows almost any other program or command to be
executed from within GENPLOT. Once the external command is completed, control
returns to GENPLOT. If no <command> is given on the line with DOS, you are
prompted for a command to be executed.
A blank command to be executed executes a secondary DOS shell, i.e. a new
running copy of DOS. GENPLOT is halted in the background, but is kept in
memory. The new DOS shell has substantially less memory, but usually enough
remains to run most programs. To return to GENPLOT, type EXIT at the DOS
prompt. Warning: The new DOS shell obtains only a copy of the environment
variables. Any change in the variables is lost once EXIT is executed.
Examples: GENPLOT: dos copy a1.dat junk.dat Does the file copy
GENPLOT: dos lotus Runs LOTUS spreadsheet
GENPLOT: dos <CR>
Internal command: <CR> Blank line brings up DOS
A> copy a1.dat junk.dat <CR>
A> exit <CR>
GENPLOT:
- PAUSE -- Temporarily pause out of GENPLOT to a new DOS shell.
Syntax: PAUSE
The PAUSE command causes GENPLOT execution to be temporarily halted and a new
DOS shell to be loaded. The new DOS shell inherits the same environment as
when GENPLOT was invoked. Any DOS command (except terminate-stay-resident
programs) may be may be executed. However, since GENPLOT is only paused and
not terminated, memory is extremely limited in the new shell. There is
usually sufficient memory to run only relatively small programs.
To return to GENPLOT from the DOS shell, type EXIT.
See also: DOS
Rest of the commands - no good place to describe these
- ? -- A condensed list of commands
Syntax: ?
The ? command provides a condensed, but complete, list of all commands
available at a particular level within GENPLOT. The commands are listed in
the order that they are searched and are generally grouped according to their
functionality. The minimum abbreviation accepted for a command is shown as
uppercase letters. The remaining lowercase letters are not necessary for a
command to be recognized. Since this list is generated by the command
evaluator, it is by definition complete and up to date at all times.
The ? command is implemented within GENPLOT, ANNOTE, SAMPLE, FIT, TRANSFORM
and several other sub-systems.
- GENPLOT -- Return to GENPLOT level
Syntax: GENPLOT
Use to assure that you are at GENPLOT command level from within a macro
or to remind the computer about what you are doing.
- Help -- Display information about various commands
Syntax: HELP <topic>
Displays a list of topics which lead to help on the various commands.
I.e. does what you are doing right now! If the topic is specified, Help will
come up at that command.
- Reset -- Reset most of the GENPLOT status parameters
Syntax: RESET
The reset commands attempts to return GENPLOT to an almost virgin state, as
when first invoked. No user data is deleted, but all plotting and display
parameters are reset to the initial state. The currently active plotting
device is turned off.
- Quit -- Get out of GENPLOT
Syntax: QUIT
Quits the program completely. All temporarily archived data is lost and all
plotting devices are shut down.
- Return -- Returns from GENPLOT to the main calling program
Syntax: RETurn
Returns from GENPLOT to main calling program. In the present setup, you will
be given a harsh message and returned to GENPLOT. Use QUIT to actually leave
GENPLOT.
- Sgraph -- Change some of the esoteric plotting parameters
Syntax: SGRAPH <parameter> <value>
Used to set some of the more esoteric plotting parameters that
GENPLOT uses, including subscript and superscript sizes and label
lettering sizes. SGRAPH LIST will provide a listing of all parameter
and their current values. You can use LET to change the values of
these variables. See section 4m of the manual for a complete list.
TICK -- Length of the major tick marks, default is 0.16 inches.
TICK3 -- Length of minor tick marks on the axes, default is 0.08 inches.
CSMIN -- Minimum height of axis marking numbers, the default is 0.07 inches.
CSMAX -- Maximum height of axis marking numbers, the default is 0.18 inches.
TSIZE -- Height of characters in the axis titles, default is 0.22 inches.
- Script -- Open a file in which to record comments and commands
Syntax: SCRIPT <file> [-APPEND][-LOGONLY |-COMMANDS][-END |-PAUSE |-CONTINUE]
Opens a logging file where much of the subsequent input and output is
copied into. Additional comments may be inserted into the file using LOGIT.
LOGONLY and COMMANDS limit the information to be logged.
APPEND -- Append output to an existing file
LOGONLY -- Only specific LOGIT requests will be in the script file
COMMANDS -- Only the user typed text will be copied into the script file
END -- Closes the script file and stops saving information
PAUSE -- Temporarily stops collecting information
CONTINUE -- Restart a previously PAUSED script file.
- Logit -- Put a comment in the SCRIPT file.
Syntax: LOGIt [<comment>]
Logs a comment to the file opened by SCRIPT. If any text is given on
the command line, only that one line of text will be copied to the file.
If no text exists on the remainder of the line, the user will be prompted for
several lines of comments. Indicate completion by typing a blank line.
Note that this command is somewhat strange in that the entire remainder of
the command line is taken as the comment, no quote marks are necessary.
Likewise, it is impossible to place any other command after LOGIT on a single
command line.
- EMacs [filename] -- Built-in EMACS style editor
Syntax: EMacs [filename]
The F1 key within EMACS will bring up its own help concerning key bindings.
Usage: DEFINE name(arg1,arg2, ...) [=] expression
Examples: DEFINE F(ARC,ANGLE) = SIN(2*PI*ARC)-COS(ANGLE/180*PI)
DEFINE G(X) = F(X,X/2)
DEFINE STRING1 = 'This is a random string'
CREATE Y = G(X)*SIN(X/2) FROM -10 TO 10 POINTS 200
DESCRIPTION:
This command provides the means to write and define almost arbitrary
functions involving arguments given at evaluation time and any other
constants known in the system. The command actually allocates a string
variable to NAME and sets it equal to EXPRESSION. The dummy arguments
in EXPRESSION are replaced with special argument place holders (smiley
faces and such) which are then replaced evaluation time with the
appropriate values.
SYNTAX:
The equal sign is optional, however, spaces must separate it from the
NAME and EXPRESSION if it is given. Note that only spaces are recognized
as delimitors in DEFINE. EXPRESSION may not contain any spaces unless
it is enclosed in single quotes.
DEFINE may also be used simply to allocate and set string variables. If
no arguments are given, the string is copied to the variable NAME. Note
that evaluation of a STRING variable may result in rubbish.
ERRORS:
No checking is done as to the validity of the expression at definition
time. A definition error occurs only if there is no space left in the
system to allocate to new variables. At evaluation time, the function
will generate errors as any normal expression.
It is possible to redefine the system intrinsics using DEFINE, such
as SIN(X). However, defining SIN(X) = SIN(X/180*PI) to work with
degrees will fail since will SIN(X) will recursively call itself at
evaluation time and end up blowing the stack!
- DJET, DJET_PLUS, DJET_500:
Driver to support the DeskJet series of printers. These three are for
monochrome graphics output and, when enabled, use the highest compression
for data output.
Name(s):
DESKJET
DJET
DJET_PLUS
DJET_500
Subdevices:
1 - 300x300 dpi
2 - 150x150 dpi
3 - 100x100 dpi
4 - 75 x 75 dpi
Options:
See general raster driver information
Notes:
o These drivers should be used for all monochrome output, even if you
have a 500C or 550C printer. Output is limited to the single plane
requiring less I/O, less CPU, less memory and less disk space.
- DJET_500C, DJET_550C:
Driver to support the color DeskJet series of printers. These two devices
output full color plots in 7 colors (white, black, red, green, yellow, ...)
Name(s):
DJET_500C
DJET_550C
Subdevices:
1 - 300x300 dpi
2 - 150x150 dpi
3 - 100x100 dpi
4 - 75 x 75 dpi
Options:
See general raster driver information
Notes:
o Since the DeskJet does not support partial color planes, only monochrome
(1 plane) or full color (3 or 4 planes) are possible. This driver
supports only the full color mode with 7 unique colors.
o For monochrome graphics, it is MUCH more efficient to specify the
DJET_500 driver. Use the 500C and 550C only for color plots.
o Painting black and color bleeding. The 550C can simultaneously print
with the black and color pens; the 500C can only use colors in color
mode. Consequently, the 550C uses the KCMY (black/cyan/magenta/yellow)
palette with black drawn as a true black using the black pen; other
colors are generated as combinations of the CMY pens. The 500C uses
the CMY palette only and black is created by combining CMY (resulting
in a dirty gray as much as black color). Because of the different ink
compositions, there is some potential for bleeding of the black and
colors in the KCMY palette. If this is a problem, use the 500C driver
only which is limited to the CMY palette.
o Even compressed, output files can be extremely large for very complex
graphics.
- Postscript Driver:
Driver to generate Adobe DCS v3.0 compatible Postscript output, either as
direct image file, or as an encapsulated postscript file (epsf).
Name(s):
POSTDRV
Subdevices:
1 - Landscape format.
2 - Portrait format. Graph origin at lower left page corner.
3 - Unshifted portrait mode. Graph extends down and to
right of origin point. Useful for inserting into docs.
6 - EPS output, otherwise same as device 1.
7 - EPS output, otherwise same as device 2.
8 - EPS output, otherwise same as device 3.
4,5,9,10 - reserved for expansion
Options:
1 - 8.5"x11" paper
2 - 8.5"x14" paper
3 - 11"x17" paper
Notes:
o Format should be compatible with Adobe DCS level 3.0 and is so marked.
o EPS format devices enforce a single page limit (part of EPS definition).
o EPS format devices attempt to write the bounding box at the head of the
file instead of using (atend) in the DCS comments. This will only
succeed if the I/O channel is a true (seekable) file. Do not specify a
pipe output channel if you plan to use the EPS file in another document.
- Laser Printers (non-Postscript) and Dot Matrix Printers:
Collection of drivers, closely related, which handle raster devices such as
the HP LaserJet series. All require a conversion step from the vector
output nature of the plotting package to the dot-by-dot description of the
printed page. This conversion is handled by a separate program, vsort.run.
Name(s):
LASERJET HP LaserJet Family
LJET_II
LJET_III
LASERJET3
DESKJET HP DeskJet Family
IBM4019 IBM (LexMark) LaserPrinter
0 -> 300x300 dpi
1 -> 300x300 dpi
2 -> 150x150 dpi
3 -> 100x100 dpi
4 -> 75x 75 dpi
LJET_IV HP LaserJet Family
LASERJET4
1 -> 600x600 dpi
2 -> 200x200 dpi
3 -> 100x100 dpi
4 -> 75x 75 dpi
PAINTJET HP PaintJet Family
0 -> 180x180 dpi 1 color
1 -> 180x180 dpi 3 color
2 -> 180x180 dpi 7 color
3 -> 180x180 dpi 15 color
4 -> 90x 90 dpi 1 color
5 -> 90x 90 dpi 3 color
6 -> 90x 90 dpi 7 color
7 -> 90x 90 dpi 15 color
DESKJETC HP Color DeskJet Family
0 -> 300x300 dpi 1 color (warning - may not be functioning yet)
1 -> 300x300 dpi 3 colors
2 -> 300x300 dpi 7 colors
3 -> 150x150 dpi 1 color
4 -> 150x150 dpi 3 colors
5 -> 150x150 dpi 7 colors
6 -> 100x100 dpi 1 color
7 -> 100x100 dpi 3 colors
8 -> 100x100 dpi 7 colors
9 -> 75x 75 dpi 1 color
10 -> 75x 75 dpi 3 colors
11 -> 75x 75 dpi 7 colors
MX80 Epson MX-80 Dot Matrix Printers
0 -> 72x 60 dpi
1 -> 72x 60 dpi
2 -> 72x120 dpi
3 -> 216x120 dpi
OKIDATA Okidata dot matrix printer
0 -> 72x 72 dpi
1 -> 72x 72 dpi
GEMINI Gemini dot matrix printers
0 -> 72x 60 dpi
1 -> 72x 60 dpi
2 -> 72x120 dpi
3 -> 144x 60 dpi
LQ500 Epson LQ500 24 pin dot matrix printer
0 -> 216x 60 dpi
1 -> 216x 60 dpi
2 -> 216x120 dpi
3 -> 216x180 dpi
LQ800 Epson LQ800 24 pin dot matrix printers
X24E IBM X24E 24 pin dot matrix printer
0 -> 180x 60 dpi
1 -> 180x 60 dpi
2 -> 180x120 dpi
3 -> 180x180 dpi
Subdevices:
See specification above under each name.
Options (bitwise additive):
1 - Draw "point" as an isolated pixel on output device
2 - Suppress final form feed at end of plot
4 - Suppress any reset of printer
8 - Don't emulate wide lines, make all a single pixel
16 - Don't attempt to compress output
32 - Suppress any blank scan lines at top of page
64 - output page immediately on drawing end (always)
128 - rotate output page by 180 degrees
256 - rotate output page by 90 degrees
Notes:
o Most of the Options are used when creating plots for insertion into other
programs, such as word processors. Normally, both form feeds and resets
should be suppressed. It may be useful to suppress blank lines to get
the plot appearing at the "top" of the page.
o No compression should only be turned on if including output into a
document and that program cannot handle optimized output. File size can
increase dramatically (especially at 300x300 dpi).
o The option to rotate output by 90 degrees must be used with some care
since the output will assume the printer can take the full "width" which
is now, by default, 11 inches.
o For the LJET_IV, you may also choose to use the POSTSCRIPT driver if so
equipped.
- Tektronix graphics output (PLOT-10)
Driver implements the binary graphics encoding used by Tektronix 4010
type graphics terminals. This is a common emulation mode for many graphics
terminals, as well as for some xterm sessions.
Name(s):
TEKTRX
Subdevices:
1 - Tektronix 4010 type terminal
2 - Tektronix 4014 type terminal
3 - Tektronix 4105 type color terminal
4 - Selanar SG200 enhancement for VT100 terminals
5 - Visual 550 tektronix emulator
6 - Selanar HiReZ terminal
7 - Digital Engineering TAB emulator
8 - VT340/TEK (emulation used by KERMIT implementations)
9 - Tektronix 4105 in edit mode
10 - XTerm VT102 and Tek4014 emulator
Options:
0 - Normal value - terminal is fast and can accept full data rate
1 - Send SYNC characters so real Tektronix 4010 at 9600 baud can accept
2 - Send SYNC characters so real Tektronix 4010 at 4800 baud can accept
4 - Send SYNC characters so real Tektronix 4010 at 2400 baud can accept
8 - Send SYNC characters so real Tektronix 4010 at 1200 baud can accept
32 - Send SYNC characters so real Tektronix 4010 at 300 baud can accept
Notes:
o True Tektronix 4010 terminals can't accept data too fast. SYNC characters
are sent to "mark time" while drawing occurs. Option parameter sets the
relative number that must be sent depending on connection baud rate. For
all emulators, this can be set to 0 to disable delay time.
o The various devices vary primarily in the escape sequences used to switch
between the graphics screen and the text screen.
- X-Window device driver:
Device to implement graphs as a separate window on X terminals.
Name(s):
xdriver
Subdevices:
1 - none implemented
Options:
1 - none implemented
Notes:
o Default device with no options at the moment. Needs further development.
o Cursor is the default small X cursor. Box mode works but box is created
as zero size. Press and hold left mouse botton to rescale size.
o Keys currently do not work to return coordinates from cursor. Only the
mouse buttons.
- HP and related pen plotters (HPGL):
Device driver supports most plotters compatible with the HP-GL language.
Use subset if exact match not available.
Name(s):
HP-GL
Subdevices:
1 - HP 9872S
2 - HP 7220AC
3 - HP 7220ST
4 - HP 7225A
5 - HP 7574A - very common lab 6 pen plotter
6 - HP 7550A - very common fast 6 pen plotter, auto paper feed
7 - HP 7220 - low cost 2 pen plotter
Options:
0 - query paper size at run time
1 - 8.5"x11" paper (A size)
2 - 8.5"x14" paper (B size)
3 - 210x297mm paper (A4 size)
4 - 297x420mm paper (B4 size)
Notes:
o If the specified sub-device is negative, initialization code for
the communication port will not be generated.
o I/O channel of plotter can be configured to run with XON/XOFF, hardware
using DTR or ENQ/ACK. DTR is best, XON/XOFF next. Use I/O channel
pre-options to specify.
o If output is meant for a spooler, use the negative device mode to disable
communication initialization and trust the spooler.
- Word Perfect Graphics driver:
Device driver to generate .wpg files for inclusion in WordPerfect documents.
Name(s):
WPDRV
Subdevices:
none implemented
Options:
1 - 11"x11" maximum size
2 - 8.5"x11" nominal paper size
3 - 8.5"x14" nominal paper size
4 - 11"x17" nominal paper size
Notes:
o Since WordPerfect scales plots to fit in the space alloted, the size is
nominally irrelevent. Specifying option 1 allows either portrait or
landscape plots to be generated without shrinking.
o Output must be sent to a real (seekable) output file. The header is
rewritten at the end of the plot.
- TIFF driver, output a TIFF B/W file at various resolutions.
Name(s):
TIFF
Subdevices:
1 - 300 DPI
2 - 150 DPI
3 - 100 DPI
4 - 75 DPI
5 - 72 DPI
Options (bitwise additive):
1 - draw dots as single dots, not tiny cross
2 - suppress formfeed on output (ignored)
4 - suppress reset prior to output (ignored)
8 - suppress linewidth emulation
16 - suppress compression algorithms
32 - suppress blank bands at top of output
64 - output page immediately on drawing end (always)
128 - rotate output page by 180 degrees
256 - rotate output page by 90 degrees
Notes:
o In general, 256 should be used when in landscape mode to get output
presented as long edge horizontal. Default is like page output with long
axis down. 128 should be used if sending flipxy output to get output
appearing normally.