Xmgr: Command interpreter reference and parameter file format

## Command interpreter reference and parameter file format

- Introduction
- Reference
- Printing
- Display
  - Time stamp
- Sets
  - Set operations
  - Block data
- Graphs
  - Graph operations
  - Graph focus
  - Graph frame
  - Autoscaling
  - Title and subtitle
  - Legend
- Axes
  - Axes labels
  - Tick marks
  - Tick labels
- Regions
- Objects
  - Boxes/Ellipses
  - Lines
  - Strings
- World scaling
  - World stack
  - Viewport
- Math
  - Transformations
  - Non-linear fit settings
- Keyword aliases
- IO
- Defaults
- Miscellaneous Commands

## Introduction

xmgr provides a command line interface and the ability to save plot parameters in a file for later retrieval. The syntax for the command line interpreter and parameter files is the same. It is instructive to read a parameter file into the command line interpreter and press the `Replay' button to verify this feature.

## Reference

Case is ignored by the command line interpreter.

For the sake of clarity, however, CAPITALS are generally to be taken literally in the following examples while lower case words represent parameters:

color
  integer value from 0 to 29.
string
  double quote enclosed character string.
integer
  any integer >= 0
number
  any floating point value >= 0.0
fitparm
  Parameter used for non-linear fit in the form An where n is the number of the parameter.
fitpmin
  Low bound for a parameter used for non-linear fit in the form AnMIN where n is the number of the parameter.
fitpmax
  Upper bound for a parameter used for non-linear fit in the form AnMAX where n is the number of the parameter.
expr
  any expression (includes negative floating point values)
onoff
  ON or OFF
torf
  TRUE or FALSE
setnum
  Set descriptor in the form Sn where n is the number of the set.
graphno
  Graph descriptor in the form Gn where n is the number of the graph.
regnum
  Region descriptor in the form Rn where n is the number of the region.
axis
  One of XAXIS, YAXIS, ZEROXAXIS, ZEROYAXIS, XAXES, YAXES.
direction
  One of UP, DOWN, LEFT, RIGHT, IN, OUT.
opchoice
  One of TOP, BOTTOM, LEFT, or RIGHT.
xytype
  one of (number of values per point in parentheses):
  - XY (2) normal x-y set with two coordinates
  - XYDX (3) XY with errorbars for x
  - XYDY (3) XY with errorbars for y
  - XYDXDX (4) XY with lower and upper errorbars for x
  - XYDYDY (4) XY with lower and upper errorbars for y
  - XYDXDY (4) XY with errorbars for x and y
  - XYZ (3) print the value of z at x,y
  - XYRT (4) circle with radius r at x,y
  - XYHILO (5) draw a line at x from y0 to y1 and put markers at y2 and y4
  - XYBOX (5) box at x,y0, y1,y2 filled with color y4
  - XYBOXPLOT (6) x, median, lower inner value, upper inner value, lower whisker, upper whisker
  - XYSTRING (3) string at x,y
  - XYXX (4) ???
  - XYYY (4) ???
  - XYZW (4) ???
  - XYUV (4) vector u,v at x,y
  - NXY (...) read from file: x y1 y2 ... y30
  - BIN (...) read from a binary file
  - POLY (?)
  - RAWSPICE (?) raw file format produced by SPICE
formatchoice
  One of:
  - DECIMAL - 0.0
  - EXPONENTIAL - 0e+-0
  - POWER - 1010
  - GENERAL - varies between 0.0 and 0e+0
  - DDMMYY - requires data in Julian date format
  - MMDDYY - requires data in Julian date format
  - YYMMDD - requires data in Julian date format
  - YYMMDDHMS - requires data in Julian date format
  - MMYY - requires data in Julian date format
  - MMDD - requires data in Julian date format
  - MONTHDAY - requires data in Julian date format
  - DAYMONTH - requires data in Julian date format
  - MONTHS - requires data in Julian date format
  - MONTHSY - requires data in Julian date format
  - MONTHL - requires data in Julian date format
  - DAYOFWEEKS - requires data in Julian date format
  - DAYOFWEEKL - requires data in Julian date format
  - DAYOFYEAR - requires data in Julian date format
  - HMS - requires data in Degrees format
  - MMDDHMS - requires data in Degrees format
  - MMDDYYHMS - requires data in Degrees format
  - DEGREESLON - requires data in Degrees format
  - DEGREESMMLON - requires data in Degrees format
  - DEGREESMMSSLON - requires data in Degrees format
  - MMSSLON - requires data in Degrees format
  - DEGREESLAT - requires data in Degrees format
  - DEGREESMMLAT - requires data in Degrees format
  - DEGREESMMSSLAT - requires data in Degrees format
  - MMSSLAT - requires data in Degrees format

  The Julian date format is the long form. There are 2 programs in the subdirectory aux/ that can be used to convert data from Gregorian to Julian and vice versa. The Degrees format is for latitude and longitude. Below the equator latitudes are negative. Longitude is assumed positive east of Greenwich and negative to the west.

## Printing

In the discussion to follow, printer refers to one of:

- PSMONOP - PostScript portrait.
- PSMONOL - PostScript landscape
- MIFP - Maker Interchange Format portrait.
- MIFL - Maker Interchange Format landscape.
- HPGLP - HPGL portrait.
- HPGLL - HPGL landscape.
- FILE - print to a file rather than to the device.
- HARDCOPY - the current hardcopy device.

- PRINT printer string

  Set the printer command string to string.

  Example:

  print psmonop "lpr -Pps"

- PRINT TO HARDCOPY

  Spool hardcopy output to the printer. This command sets the output destination, but does not generate a hardcopy, see the HARDCOPY command.

- PRINT TO FILE

  Spool hardcopy output to a file, using the current value of the printer file string (see PRINT TO string above). This command sets the output destination, but does not generate a hardcopy, see the HARDCOPY command.

- PRINT TO FILE string

  Spool hardcopy output to a file named string. This command sets the output destination, but does not generate a file, see the HARDCOPY command.

  Example:

  print to file "hardcopy.out"

- PRINT TO printer

  Set the hardcopy device to printer.

- PS LINEWIDTH BEGIN number

  Set the starting linewidth for the translation of internal lines to postscript lines.

- PS LINEWIDTH INCREMENT number

  Set the linewidth increment for the translation of internal lines to postscript lines.

- HARDCOPY

  Print to the current hardcopy device or file.

- DEVICE integer

  Set the screen device to integer. At the present time 0 (the X server) is the only value.

  ## Display

- PAGE LAYOUT pagelayout

  Define the page layout (FREE, LANDSCAPE, PORTRAIT, FIXED).

- REDRAW

  Refresh the display.

- AUTO REDRAW onoff

  Toggle the automatic redrawing of the display.

- STATUS AUTO REDRAW onoff

  Toggle the automatic redrawing of the display after set operations in the status window.

- STATUS

  Update the status window.

- TOOLBAR onoff
- STATUSBAR onoff
- LOCATORBAR onoff

  Turn the respective bar on or off .

- LOCATOR onoff

  Turn the locator reading on the front panel on or off.

- BACKGROUND COLOR color

  Set the background color of the drawing area.

- CMAP color, integer, integer, integer

  Set the RGB values of a colormap entry. The value of color ranges from 2 to 29, The three integer values following the color number are values from 0 to 255 and represent red, green, and blue resp. Colors 0 and 1 are black and white (reversed if the -rvideo command line option was selected), and cannot be changed. See the `-nofreecolors` command line switch if you have problems with button or background colors changing.

  Example:

  To set colormap entry 5, use

  cmap 5, 0, 0, 255

  This sets color 5 to solid blue.

- PAGE direction

  Page left, right, up, down, in. out.

- PAGE integer

  Set the amount of scrolling, and integer value giving the amount of scroll in percent of the graph scaling. For example:

  PAGE 100

  would set the amount to scroll left, right, up, down to 100 percent of the graph axis scaling.

- PAGE INOUT integer

  Set the amount to increase or decrease the graph scaling when using the In/Out buttons on the main panel. An integer value expressing the percent to expand or shrink.

- LINK PAGE onoff

  Toggle linked scrolling. Linked scrolling affects the scroll buttons on the main panel, when linked scrolling is on, all graphs are scrolled simultaneously. Linked scrolling OFF makes scrolling affect the current graph only.

- READ IMAGE string

  Read an Image from file named string (currently not available).

- IMAGE XY number, number

  Set the location of the Image.

  ## Time stamp

  The following commands control time stamp appearance:

- TIMESTAMP onoff
- TIMESTAMP FONT number
- TIMESTAMP CHAR SIZE number
- TIMESTAMP ROT number
- TIMESTAMP COLOR number
- TIMESTAMP LINEWIDTH number
- TIMESTAMP number , number
- TIMESTAMP DEF string

  Their meaning is exactly as for the string-related commands.

  ## Sets

  Setnum, in the following descriptions, refer to the symbolic name of each set, i.e., the letter `s' followed by the integer number of the set. S0 would refer to set 0, s1 to set 1, etc. The following commands for setting set parameters have two prefixes, GRAPHS and SETS, that allow the setting to be made for all graphs, all sets, or a given set in all graphs. So, to set the line width for set 0 to be 3 in all graphs that have a set 0 active, the command would be:

  graphs s0 linewidth 3

  Likewise, to set the line width for all sets in the current graph, give the command:

  sets linewidth 3

  To set the line width for all sets in all graphs to 3, execute:

  graphs sets linewidth 3

- setnum ON
- setnum IGNORE

  Toggle the active/inactive status of sets. This can be used to force xmgr to ignore a set(s), even though data are still attached to the set. For example, assuming S0 is an active set:

  S0 ignore

  will allow xmgr to ignore S0 for all purposes, except any operation that kills a set. Autoscaling will ignore this set, etc - in effect, S0 is dead. To bring it back to life:

  S0 on

  will reintroduce the set with its data intact. This operation may be performed in either Edit/Set operations/De-activate or in the File/Status popup.

- setnum TYPE xytype

  Set the type of set setnum to xytype.

- setnum FONT integer

  Set the font to use when the set type is xyz.

- setnum PREC integer

  Set the precision when the set type is xyz.

- setnum FORMAT formatchoice

  Set the format to use when the set type is xyz.

- setnum SYMBOL integer

  Set the symbol for the set.

- setnum SYMBOL SIZE number

  Set the size of the symbol.

- setnum SYMBOL CENTER torf

  Draw or don't draw a dot in the center of symbol.

- setnum SYMBOL CHAR integer

  Set the character to use when using the symbol type character. The value is the decimal representation of the character using the ASCII collating sequence.

- setnum SYMBOL COLOR color

  Set the symbol color.

- setnum SYMBOL FILL number

  Set the fill type of the symbol (0: transparent, 1: filled with symbol foreground color, 2: filled with background color).

- setnum SYMBOL SKIP integer
- setnum SKIP integer

  Set the number of points to skip before placing a symbol.

- setnum SYMBOL LINESTYLE integer

  Set the symbol line style for the set.

- setnum SYMBOL LINEWIDTH integer

  Set the symbol line width for the set.

- setnum LINESTYLE integer

  Set the line style for the set.

- setnum LINEWIDTH integer

  Set the line width for the set.

- setnum COLOR integer

  Set the color to use to draw the lines and symbol.

- setnum FILL integer

  Set the type of fill for the set.

- setnum FILL WITH COLOR

  Set the type of fill for the set.

- setnum FILL WITH PATTERN

  Set the type of fill for the set.

- setnum FILL COLOR integer

  Set the color for the fill if the fill selected is color.

- setnum FILL PATTERN integer

  Set the color for the fill if the fill selected is color.

- setnum ERRORBAR TYPE opchoice

  Set the the error bar display type. Opchoice is one of RIGHT, LEFT, or BOTH if the error bar type is xydx or xydxdx, or TOP, BOTTOM, or BOTH if the type is xydy or xydydy. The default in either case is BOTH, i.e. display both error bars.

- setnum ERRORBAR LENGTH number

  Set the length of the error bar.

- setnum ERRORBAR LINEWIDTH integer

  Set the line width for the error bar.

- setnum ERRORBAR LINESTYLE integer

  Set the linestyle for the error bar.

- setnum ERRORBAR RISER onoff

  Toggle the display of the error bar riser.

- setnum ERRORBAR RISER LINESTYLE integer

  Set the line style for the error bar riser.

- setnum ERRORBAR RISER LINEWIDTH integer

  Set the line width for the error bar riser.

- setnum COMMENT string

  Set the comment string for the set.

  ## Set operations

- ACTIVATE setnum number

  Activate a set in the current graph and set the length

- DEACTIVATE setnum

  Deactivate a set in the current graph.

- DEACTIVATE graphno.setnum

  Deactivate a set in the specified graph.

- REACTIVATE setnum

  Reactivate a deactivated set in the current graph.

- REACTIVATE graphno.setnum

  Reactivate a deactivated set in the specified graph.

- COPY setnum TO setnum

  Copy a set to another set

- COPY graphno.setnum TO graphno.setnum

  Copy a set from a particular graph to a set in another graph

  Example

  copy g0.s0 to g1.s5

- MOVE setnum TO setnum

  Move a set to another set.

  Example

  move s0 to s1

- MOVE graphno.setnumTO graphno.setnum

  Move a set from a particular graph to a set in another graph

  Example

  move g0.s0 to g1.s5

- KILL setnum
- KILL setnum SAVEALL

  Kill a set. Plot parameters are set to their default values, unless SAVEALL is given.

- KILL SETS
- KILL SETS SAVEALL

  Kill all sets of the current graph. Plot parameters are set to their default values, unless SAVEALL is given.

- setnum POINT expr, expr
- graphno.setnum POINT expr, expr

  Add a point to a set, create the set if the set is inactive. The first version adds a point to set setnum in the current graph, the second adds a point to setnum in the graph graphno.

- setnum DROP expr, expr
- graphno.setnum DROP expr, expr

  Drop points in setnum (or graphno.setnum). The parameters give the index of the first and last points to drop, respectively.

- SORT setnum sorton sortdir

  Sort setnum on X or Y. sortdir is ASCENDING or DESCENDING.

- TARGET setnum
- TARGET graphno.setnum

  Define the named set to be used whenever a new set is about to be automatically selected and activated. If the set already exists (by the time a new set is needed), the command is ignored. Once the command succeeds, the target definition is cleared.

  ## Block data

  The two block data commands allow block data to be read and sets formed from the active set of block data.

- READ BLOCK string

  Read a file of block data from file string.

- BLOCK xytype string

  Create a set of type xytype using columns coded in string. String describes columns as: "c1:c2:..."

  Where c1, c2, ... are the numbers of the columns to use in the construction of the set from the block data.

  Examples:

  Create a set with error bars using x from column 1, y from column 2 and the errors in column 5:.

  read block "block2.dat"

  block xydy "1:2:5"

  Create an XY type data set from columns 7 and 2.

  block xy "7:2"

  ## Graphs

- WITH graphno

  Set the current graph to graphno.

- graphno onoff

  Set graphno on or off.

- graphno AUTOSCALE TYPE AUTO

  Set the method of autoscaling to a type developed by Paul Heckbert. This method makes nice tick spacing, but fiddles with scales of the axes.

- graphno AUTOSCALE TYPE SPEC

  Set the method of autoscaling to use the minimum and maximum values of the data.

- graphno HIDDEN torf

  Toggle the display of graphno.

- graphno TYPE graphtype

  Set the type of graphno to graphtype, where graphtype is one of:

  - XY - Linear scaling on both X and Y axes (the default).
  - BAR - bar chart.
  - HBAR - horizontal bar chart.
  - STACKEDBAR - stacked bar chart.
  - STACKEDHBAR - horizontal stacked bar chart.
  - LOGX - logarithmic X axis, linear Y axis.
  - LOGY - linear X axis, logarithmic Y axis.
  - LOGXY - Log-log graph.
  - POLAR - polar graph.
  - SMITH - Smith graph.

- graphno BAR SIZE number
- graphno STACKEDBAR SIZE number

  Set the thickness of the bars in a bar chart.

- graphno FIXEDPOINT onoff

  Toggle the use of the graph fixed point, i.e., the point used as a reference for the locator display.

- graphno FIXEDPOINT XY number, number

  Set the value of the graph fixed point.

- graphno FIXEDPOINT TYPE number

  Set the type of display for the locator on the main panel.

- graphno FIXEDPOINT FORMAT formatchoice formatchoice

  Select the format to use for both X and Y in the locator display.

- graphno FIXEDPOINT PREC integer, integer

  Set the number of places to display to the right of the decimal point in the locator display for both X and Y.

  ## Graph operations

- KILL graphno

  Kill graph graphno.

- KILL GRAPHS

  Kill all graphs and sets, but not annotative text, lines, and boxes.

- FLUSH

  Kill all graphs, sets, and annotation.

- ARRANGE rows, columns

  Arrange graphs in the given number of rows and columns.

- GRAPHS MAX SETS number
- graphno MAX SETS number

  Set the maximum number of sets per graph for all graphs (first version) or a specified graph (second version).

  ## Graph focus

- FOCUS graphno

  Set the current graph to graphno.

- FOCUS SET

  Focus fixed on the current graph.

- FOCUS FOLLOWS

  Focus follows the pointer.

- FOCUS CLICK

  Set the focus by clicking on a graph.

- FOCUS onoff

  Turn the drawing of the focus indicators on or off.

  ## Graph frame

- FRAME onoff

  Toggle the display of the current graph's frame.

- FRAME TYPE number

  Set the type of frame for the current graph:

  - 0 = rectangle
  - 1 = Lines along the left and bottom of the graph.

- FRAME LINESTYLE number

  Set the line style of the current graph's frame.

- FRAME LINEWIDTH number

  Set the width of the line for the current graph's frame.

- FRAME COLOR number

  Set the color of the current graph's frame.

- FRAME FILL onoff

  Toggle the fill of the graph frame.

- FRAME BACKGROUND COLOR number

  Set the color to use for filling the current graph's frame.

  ## Autoscaling

- AUTOSCALE

  Autoscale the current graph

- AUTOSCALE setnum

  Autoscale the current graph on a particular set

- AUTOSCALE XAXES

  Autoscale the X-axis and the axis at Y = 0 in the current graph.

- AUTOSCALE YAXES

  Autoscale the Y-axis and the axis at X = 0 in the current graph.

- AUTOSCALE torf

  Suppress autoscaling on startup. Use this command in a data file that uses embedded parameter settings to set the axes scaling.

- AUTOTICKS

  Set sensible values for all tick marks of the current graph.

  ## Title and subtitle

- TITLE string

  Set the graph title.

- TITLE FONT integer

  Set the font for the graph title.

- TITLE SIZE number

  Set the character size for the graph title.

- TITLE COLOR integer

  Set the color for the graph title.

- SUBTITLE string

  Set the graph subtitle.

- SUBTITLE FONT integer

  Set the font for the graph subtitle.

- SUBTITLE SIZE number

  Set the character size for the graph subtitle.

- SUBTITLE COLOR integer

  Set the color for the graph subtitle.

  ## Legend

- LEGEND onoff

  Toggle display of the legend.

- LEGEND LOCTYPE worldview

  Position the legend in either world or viewport coordinates.

- LEGEND VGAP integer

  Set the vertical gap between legend entries in characters.

- LEGEND HGAP integer

  Specify the gap between the display of the symbol and the legend label in units of characters.

- LEGEND LENGTH integer

  Set the length of the legend in units of characters.

- LEGEND expr, expr

  Set the location of the legend.

- LEGEND X1 expr

  Set the X value of the location.

- LEGEND Y1 expr

  Set the Y value of the legend.

- LEGEND FONT integer

  Set the font to use for the legend labels.

- LEGEND CHAR SIZE number

  Set the size of the characters in the legend label.

- LEGEND LINEWIDTH integer

  Set the line width to use to draw the legend labels.

- LEGEND COLOR integer

  Set the color of the legend labels.

- LEGEND BOX onoff

  Toggle the display of the bounding box for the legend.

- LEGEND BOX FILL onoff

  Toggle the filling of the bounding box for the legend.

- LEGEND BOX LINEWIDTH integer

  Set the line width to use to draw the bound box for the legend.

- LEGEND BOX LINESTYLE integer

  Set the line style to use to draw the bound box for the legend.

- LEGEND BOX COLOR integer

  Set the color of the legend bounding box.

- LEGEND BOX FILL COLOR integer

  Set the color to use for the filled legend bounding box.

- LEGEND BOX FILL PATTERN integer

  Set the pattern to use for the filled legend bounding box.

- LEGEND BOX FILL WITH colpat

  Set the type of fill for the bounding box, either COLOR or PATTERN.

- LEGEND STRING integer string

  Set the legend label for setnum integer.

  ## Axes

  The are two axes in each coordinate direction. In the case of the X coordinate direction, there is one that follows the world scaling, one at Y = 0 and another that may be used to display an alternate scale. The names used by xmgr to refer to these axes are, XAXIS, ZEROXAXIS, respectively. Likewise along Y there is the YAXIS, ZEROYAXIS. There are names that can be used to refer to all the axes along a coordinate direction or to both directions or to all graphs, these being AXES (both coordinate directions, current graph), XAXES (along X in the current graph), YAXES (along Y in the current graph), and preceding these with the key word GRAPHS, will cause the setting to be made throughout all the active graphs. In the following descriptions, axis refers to the choices described above.

- axis onoff

  Toggle the display of the axis or axes referred to by axis.

- axis COLOR integer

  Set the color for the axis or axes specified by axis.

- axis LINEWIDTH integer

  Set the line width for the axis or axes specified by axis.

- axis LINESTYLE integer

  Set the line style for the axis or axes specified by axis.

- axis FONT integer

  Set the font to use for text for the axis or axes specified by axis.

- axis CHAR SIZE number

  Set the character size for text for the axis or axes specified by axis.

  ## Axes labels

- axis LABEL string

  Set the text string to use for the axis label.

- axis LABEL LAYOUT PERP

  Set the layout of the axis label to be perpendicular to the axis.

- axis LABEL LAYOUT PARA

  Set the layout of the axis label to be parallel to the axis.

- axis LABEL CHAR SIZE number

  Set the character size of the text used for the axis label.

- axis LABEL FONT integer

  Set the font to use for the axis label.

- axis LABEL COLOR integer

  Set the color to use for the axis label.

- axis LABEL LINEWIDTH integer

  Set the line width to use for drawing the axis label. Axes bar

- axis BAR onoff

  Toggle the display of the axis bar. The default is OFF.

- axis BAR COLOR integer

  Set the color to use for the axis bar.

- axis BAR LINEWIDTH integer

  Set the line width to use when drawing the axis bar.

- axis BAR LINESTYLE integer

  Set the line style to use for drawing the axis bar.

  ## Tick marks

- axis TICK MAJOR onoff
- axis TICK MINOR onoff

  Turn on or off respective tick marks. Minor ticks are displayed only if also major ticks are on.

- axis TICK MAJOR expr

  Set the tick spacing for major tick marks.

- axis TICK MINOR expr

  Set the spacing for minor tick marks.

- AUTOTICKS

  Set sensible values for all tick marks of the current graph.

- axis TICK OFFSETX number

  Set the amount to offset the axis, in viewport coordinates in the X direction.

- axis TICK OFFSETY number

  Set the amount to offset the axis in viewport coordinates in the Y direction.

- axis TICK ALT onoff

  Toggle the use of the alternate map for the axis scaling.

- axis TICK MIN number

  Specific the minimum value to use for the alternate map.

- axis TICK MAX number

  Specify the maximum value to use for the alternate map.

- axis TICK DEFAULT number

  Set the default number of ticks to use when autoscaling.

- axis TICK inout

  Set the display of tick marks to IN, OUT, or BOTH.

- axis TICK LOG onoff

  Currently has no effect.

- axis TICK SIZE number

  Set the size of tick marks.

- axis TICK MAJOR SIZE number

  Set the size of major tick marks.

- axis TICK MINOR SIZE number

  Set the size of minor tick marks.

- axis TICK COLOR number

  Set the color to use for tick marks.

- axis TICK MAJOR COLOR number

  Set the color to use for major tick marks.

- axis TICK MINOR COLOR number

  Set the color to use for minor tick marks.

- axis TICK MAJOR LINEWIDTH number

  Set the line width to use for grid lines at major tick marks.

- axis TICK MAJOR LINESTYLE number

  Set the line style to use for grid lines at major tick marks.

- axis TICK MINOR LINEWIDTH number

  Set the line width to use for grid lines at minor tick marks.

- axis TICK MINOR LINESTYLE number

  Set the line width to use for grid lines at minor tick marks.

- axis TICK MAJOR GRID onoff

  Toggle the display of grid lines at major tick marks.

- axis TICK MINOR GRID onoff

  Toggle the display of grid lines at minor tick marks.

- axis TICK OP opchoice

  Set the display of tick marks on the axis to TOP, BOTTOM, or BOTH if the axis is in the X direction, or LEFT, RIGHT, or BOTH if the axis is in the Y direction. The default is BOTH in either case.

- axis TICK TYPE AUTO

  Use the values for major and minor spacing for draw the tick marks. See the next it for tick marks at specified locations.

- axis TICK TYPE SPEC

  Use specified values for drawing tick marks. These values are for major tick marks only.

- axis TICK SPEC integer

  Give the number of specified tick marks.

- axis TICK number, expr

  Set the value of specified tick mark number integer to value, expr.

  ## Tick labels

- axis TICKLABEL PREC integer

  Set the number of places to the right of the decimal point when drawing tick labels.

- axis TICKLABEL FORMAT formatchoice

  Set the format to use for drawing tick labels.

- axis TICKLABEL APPEND string

  Append string to the tick labels.

- axis TICKLABEL PREPEND string

  Prepend string to the tick labels.

- axis TICKLABEL LAYOUT HORIZONTAL

  Set the angle of the axis tick labels to be horizontal.

- axis TICKLABEL LAYOUT VERTICAL

  Set the angle of the axis tick labels to be vertical.

- axis TICKLABEL LAYOUT SPEC

  Specify the use of the specified tick label angle.

- axis TICKLABEL ANGLE number

  Specify the angle to use for drawing the tick labels in degrees from 0 to 360 (0=horizontal, 90=vertical).

- axis TICKLABEL PLACE ON TICKS

  Put the ticklabels on the ticks.

- axis TICKLABEL PLACE BETWEEN TICKS

  Put the ticklabels between the ticks.

- axis TICKLABEL JUST justify

  Specify the type of justification to use when drawing the tick label.

- axis TICKLABEL SKIP integer

  Set the number of major tick marks to skip before drawing a tick label.

- axis TICKLABEL STAGGER integer

  Set the number of characters to use to offset the tick labels.

- axis TICKLABEL OP opchoice

  Set the side(s) to draw tick labels, LEFT, RIGHT, or BOTH for tick labels in the Y direction and TOP, BOTTOM, or BOTH for tick labels in the X direction. The default is LEFT for the Y axis tick labels and BOTTOM for the X axis tick labels.

- axis TICKLABEL SIGN signchoice

  Set the function to use on the numeric value used to create the tick mark label. One of NORMAL, ABSOLUTE, or NEGATE. The default is NORMAL, i.e., no transformation is applied. ABSOLUTE indicates that the absolute value of the tick label location is used, NEGATE is the negative of the tick mark location. The latter two can be used to achieve a reversal of axis or a reflection effect of the axes. Of course, the data will need to be transformed also.

- axis TICKLABEL START expr

  Set the value to use to begin drawing tick labels.

- axis TICKLABEL STOP expr

  Set the value to stop drawing tick labels.

- axis TICKLABEL START TYPE SPEC

  Use the specified starting value for drawing tick mark labels.

- axis TICKLABEL STOP TYPE SPEC

  Use the specified stopping value for drawing tick mark labels.

- axis TICKLABEL START TYPE AUTO

  Use the graph minimum to use as the starting point for drawing tick labels, this is the default.

- axis TICKLABEL STOP TYPE AUTO

  Use the graph maximum as the stopping point for drawing tick mark labels. This is the default.

- axis TICKLABEL VGAP number

- axis TICKLABEL HGAP number

- axis TICKLABEL CHAR SIZE number

  Set the size of characters to use when drawing the tick mark labels.

- axis TICKLABEL FONT integer

  Set the font to use when drawing tick mark labels.

- axis TICKLABEL COLOR integer

  Set the color to use for drawing tick mark labels.

- axis TICKLABEL LINEWIDTH integer

  Set the line width to use for drawing tick mark labels.

- axis TICKLABEL TYPE AUTO

  Use the values of major tick marks for position the tick mark labels.

- axis TICKLABEL TYPE SPEC

  Specify the tick mark label to use at each major tick mark.

- axis TICKLABEL integer, string Set the value for the integer'th tick mark label.

  ## Regions

  See also the page about region operations.

- regnum onoff

  Activate region regnum.

- regnum TYPE regiontype

  Set the type of region regnum to one of ABOVE, BELOW, LEFT, RIGHT, POLYI, POLYO.

- regnum COLOR color

  Set the boundary color of region regnum to color.

- regnum LINESTYLE number

  Set the boundary linestyle of region regnum to number.

- regnum LINEWIDTH number

  Set the boundary linewidth of region regnum to number.

- regnum LINE x1, y1, x2, y2

  Set the coordinates for region regnum, which has to be of type ABOVE, BELOW, LEFT or RIGHT.

- regnum XY x, y

  Add a point to the boundary of region regnum, which has to be of type POLYI or POLYO.

- LINK regnum TO graphno

  Link region regnum to graph graphno.

  ## Boxes/Ellipses

  The commands for boxes and ellipses are the exact same. Simply substitute ELLIPSE for BOX in the following commands.

  NOTE: Boxes, used or not, are numbered from 0 to the maximum number of boxes. This is also true of ellipses, lines and strings.

- WITH BOX

  Get the next available box and make it current. A box needs to be current before any of the following commands will apply.

- WITH BOX integer

  Get the box numbered integer and make it the current box

- BOX onoff

  Toggle the display of the current box.

- BOX expr, expr, expr, expr

  Set the location of the box in world or viewport coordinates depending on the value of BOX LOCTYPE. The 4 values represent xmin, ymin, xmax, ymax respectively.

- BOX LOCTYPE worldview

  Set the location type of the next box created. World or viewport coordinates.

- BOX graphno

  If the LOCTYPE is WORLD, set the graph to use.

- BOX LINESTYLE integer

  Set the line style to use for the next box created.

- BOX LINEWIDTH integer

  Set the line width of the next box created.

- BOX COLOR integer

  Set the color to use for the box lines.

- BOX FILL filltype

  Set the type of fill to either COLOR or PATTERN.

- BOX FILL COLOR integer

  Set the color to use to fill the next box created.

- BOX FILL PATTERN integer

  Set the pattern to use for the next box created.

- BOX DEF

  Define the current box using the values set above.

- CLEAR BOX

  Remove all boxes

  ## Lines

  xmgr uses an array of a data type called lines internally to hold the definition of lines. The actual construction of this data type is not important, but it is important to note that lines, used or not, are numbered from 0 to the maximum number of lines.

- WITH LINE

  Make the next available line the current line.

- WITH LINE integer

  Make line integer the current line.

- LINE onoff

  Toggle the display of the current line.

- LINE expr, expr, expr, expr

  Set the location of the current line created. The four expressions represent (X1, Y1), (X2, Y2) respectively.

- LINE LOCTYPE worldview

  Set the location type of the current line created. World or viewport coordinates.

- LINE graphno

  If the line LOCTYPE is WORLD, set the graph to use for scaling.

- LINE LINEWIDTH integer

  Set the line width of the current line created.

- LINE LINESTYLE integer

  Set the line style of the current line created.

- LINE COLOR integer

  Set the color of the current line created.

- LINE ARROW integer

  Define a line with or without arrow(s) and where they are located.

  - 0 - no arrow
  - 1 - arrow at start of line
  - 2 - arrow at end of line
  - 3 - arrow at both ends.

- LINE ARROW SIZE number

  Set the size of the current line's arrowhead.

- LINE ARROW TYPE number

  Set the type of the current line's arrowhead.

  - 0 - line
  - 1 - filled
  - 2 - hollow

- LINE DEF

  Define a line using the current set of line settings.

- CLEAR LINE

  Remove all lines.

  ## Strings

  xmgr uses an array of a data type called plotstr internally to hold the definition of strings. The actual construction of this data type is not important, but it is important to note that strings, used or not, are numbered from 0 to the maximum number of strings.

- WITH STRING

  Get the next available string

- WITH STRING integer

  Get the particular string numbered integer.

- STRING onoff

  Toggle the display of the current string.

- STRING expr, expr

  Location of the string, in world or viewport coordinates depending on the value of LOCTYPE.

- STRING LOCTYPE worldview

  Set the location type of the string, either world or viewport coordinates. If the setting is WORLD, then the strings position is affected by changes in the axes scaling, if VIEW, then the string is fixed to that spot in viewport coordinates.

- STRING graphno

  Set the graph to uses for scaling when the LOCTYPE is WORLD.

- STRING LINEWIDTH integer

  Set the line width of the current string.

- STRING COLOR integer

  Set the color of the current string.

- STRING ROT integer

  Set the rotation of the current string from-360 to 360 in degrees

- STRING FONT integer

  Set the font of the current string.

- STRING JUST integer

  Set the justification for the current string. 0 is left justified, 1 is right justified, and 2 is centered.

- STRING CHAR SIZE number

  Set the character size of the current string.

- STRING DEF string

  Define the current string using the values set above.

- CLEAR STRING

  Remove all strings

  ## World scaling

- WORLD xmin, ymin, xmax, ymax
- WORLD XMIN xmin
- WORLD XMAX xmax
- WORLD YMIN ymin
- WORLD YMAX ymax

  Set the scaling limits for the current graph.

- POLAR WORLD expr, expr

  Set the scaling limits for a polar graph.

  ## World stack

- PUSH

  Push the current graph scaling limits and tick spacing onto the graph's world stack.

- POP

  Pop the current graph's world stack and set the new scaling limits and tick spacing from the new stack top.

- CYCLE

  Cycle through the current graph's world stack.

- STACK integer

  Set the current graph's scaling limits and tick spacing to the value at position integer of the current graph's world stack.

- STACK WORLD expr, expr, expr, expr TICK expr, expr, expr, expr

  Push specific values onto the current graph's world stack - primarily for use in parameter files generated by xmgr.

- CLEAR STACK

  Clear the current graph's world stack.

  ## Viewport

- VIEW xmin, ymin, xmax, ymax

  Set the current graph's viewport (where on the device the graph is displayed).

- VIEW XMIN expr
- VIEW XMAX expr
- VIEW YMIN expr
- VIEW YMAX expr

  ## Transformations

- LOAD VAR setnum, expr, expr

  Load a set sequentially

- REGRESS (setnum, number)

  Regress a set where number is the degree of the fit in the range 1-5.

- DIFFERENCE (setnum, number)
- DIFF (setnum, number)

  Difference a set using the method specified by number.

  - 0 - forward difference.
  - 1 - backward difference
  - 2 - centered difference

- NONLFIT (setnum, number)
- NONLFIT (graphno.setnum, number)

  Run non-linear fit on set setnum from the current graph or graphno for number steps or until the required tolerance achived. The latter, alongside with other fit parameters are discussed in Non-linear fit settings

- INTEGRATE (setnum)

  Integrate a set using a trapezoid rule.

- XCOR (setno1, setno2, lag)

  Creates a new set in the first available spot with the cross/auto-correlation data of sets setno1 and setno2 (for auto-correlation, enter the same setnumber twice). The lag must be an integer, 0 < lag < length_of_set1&2 that specifies the maximum shift to use. The number of data points in the resulting set will therefore be equal to lag+1. See also this.

- splinetype(setnum, start, stop, integer)

  Draw a spline. splinetype is one of:

  - SPLINE - plain cubic spline
  - ASPLINE - Akima spline

- INTERP(setnum1, setnum2, method)

  Interpolate setnum1 at the x values of setnum2; method is 0 (linear), 1 (cubic spline) or 2 (Akima spline)

- ffttype(setnum, integer)
- ffttype(setnum, datatype, windowtype, loadx, loady)

  Compute a DFT either forward or inverse, using the DFT or FFT.

  ffttype is one of:

  - DFT - compute the DFT using the definition.
  - FFT - compute the DFT using an FFT.
  - INVDFT - compute the inverse DFT.
  - INVFFT - compute the inverse using the FFT.

  datatype is one of:

  - REAL - data are real numbers.
  - COMPLEX - data are complex numbers.

  windowtype is one of:

  - NONE
  - TRIANGULAR
  - HANNING
  - WELCH
  - HAMMING
  - BLACKMAN
  - PARZEN

  loadx is one of:

  - INDEX
  - FREQUENCY
  - PERIOD

  loady is one of:

  - MAGNITUDE
  - PHASE
  - COEFFICIENTS

  The command

  > ffttype(setnum, integer)

  is the old syntax of the FFT command and remains valid for backward compatibility. It corresponds to the command

  > ffttype(setnum, REAL, NONE, loadx(integer), MAGNITUDE)

  where loadx(0)=INDEX, loadx(1)=FREQUENCY, loadx(2)=PERIOD.

- runtype(setnum, number)

  Compute a running average, standard deviation, median, maximum, or minimum. runtype is one of the following:

  - RUNAVG - running average.
  - RUNSTD - running standard deviation.
  - RUNMED - running median.
  - RUNMAX - running maximum.
  - RUNMIN - running minimum.

- HISTO(setnum, xmin, binw, integer)

  Compute a histogram using set setnum. Xmin is the minimum value, binw the bin width, and the integer is how many bins to create.

  ## Non-linear fit settings

- FIT TITLE string

  Define the title of the fit.

- FIT FORMULA string

  Define the fit function.

- FIT WITH number PARAMETERS

  Set the number of the fit parameters.

- FIT PREC number

  Define the desired tolerance of the fit.

- fitparm CONSTRAINTS onoff

  Whether upper/lower bounds should be used to constrain parameter fitparm. The parameters themselves as well as their bounds fitpmin and fitpmax can be treated as a part of any valid expression.

  ## Keyword aliases

- ALIAS string1 string2

  Define string1 to be treated as an alias to a single keyword string2

- ALIAS FORCE onoff

  controls whether existing keywords can be overriden by aliases (off by default)

  ## IO

- SOURCE sourcetype

  Set the source (DISK or PIPE) for reading XY data sets.

- TYPE xytype

  Set the type of the next set to be read.

- FORMAT formatchoice

  Set the format of a file from which a set will be read.

- READ string

  Read an XY data set.

- READ BATCH string

  Read a batch file.

- READ xytype string

  Read a data set of a particular type.

- READ xytype sourcetype string

  Read a data set of type xytype from source sourcetype.

- GETP string

  Read a parameter file.

- PUTP string

  Write a parameter file.

- CD string

  Change working directory to string.

- WRITE setnum

  Write setnum to the standard output.

- WRITE setnum FORMAT string

  Write setnum to the standard output using string as format like printf, e.g. "%7.2f %7.2f".

- WRITE setnum FILEP filename

  Write setnum to filename.

- WRITE setnum FILEP filename FORMAT string

  Write setnum to filename using string as format like printf, e.g. "%7.2f %7.2f".

- SAVEALL filename

  Write all sets of all graphs to filename.

  ## Defaults

- DEFAULT LINESTYLE number
- DEFAULT LINEWIDTH number
- DEFAULT COLOR number
- DEFAULT CHAR SIZE number
- DEFAULT FONT number
- DEFAULT SYMBOL SIZE number
- DEFAULT SFORMAT number

  Set default value for the respective property. SFORMAT is the format for saving (ascii) projects.

  ## Miscellaneous Commands

- EXIT

  Abruptly leave xmgr.

- SLEEP number

  Sleep for number seconds (not you, of course).

- ECHO string

  Print string to the status bar.

- ECHO expr

  Evaluate expr and print result to the status bar.

- DESCRIPTION string

  Add string to the description of the current project.

- CLEAR DESCRIPTION

  Clear the description of the current project.

- USE "my_wrapper" TYPE f_of_nd FROM "/tmp/my_wrap.so"
- USE "my_wrapper" TYPE f_of_nd FROM "/tmp/my_wrap.so" ALIAS "special_func"

  Load the user-defined external function "my_wrapper" from the file "/tmp/my_wrap.so". It can be given an ALIAS using the second version. Refer to the External Modules Page on how to write external functions.

Back to the top of this page.

Back to the main help page.