Macro Language

Introduction

There are ~ 220 commands available in the Plot macro language. Most of the commands needs one or more argument. Simply enter the command followed by the arguments separated by spaces. If an argument contains spaces you have to quote the argument with ' or ". Comments can be escaped with #. For example a command may look like this:

atext 1 'Axis Text'

This commands set tha axis text label for axis 1 (the first X axis).

Command Reference

Range Commands
Buffer Commands
Control Commands
Interactive Commands
Calculation Commands
Style Commands
Data Style Commands
Axis Style Commands
Legend Commands
Text & Graphic Commands
Document Commands
Miscellaneous Commands

Variables

During macro execution several variables are available. String variable starts with a $.

cbnumber of the current working buffer in the document
$datethe current date
$documentthe filename of the current document
dx1the distance between the last two measures with the mouse (1. X axis)
dx2the distance between the last two measures with the mouse (2. X axis)
dy1the distance between the last two measures with the mouse (1. Y axis)
dy2the distance between the last two measures with the mouse (2. Y axis)
$filethe filename from the browse command
framebottomthe position of bottom frame line
frameleftthe position of left frame line
framerightthe position of right frame line
frametopthe position of top frame line
framewidththe width of the frame
$homethe users home directory
inputthe result of the last input command
$inputthe result of the last input command as string
integralthe result from the last calcint command
lthe run variable for loops
lxthe X value during a dataloop
lythe Y value during a dataloop
lxethe X error value during a dataloop
lyethe X error value during a dataloop
lastbufferthe number of the last buffer generated with one of the calculation commands
marginbottomthe bottom margin
marginleftthe left margin
marginrightthe right margin
margintopthe top margin
nbnumber of data buffer in the document
optionthe result of the askoption command
ref1the 1. reference value
ref2the 2. reference value
linbga, linbgbthe reference values for linear background subtraction
rega, regb, regrthe result of the last regresion
textheightthe height of the last added text
textwidththe width of the last added text
$timethe current time
$userthe users name
windowheightthe window height
windowwidththe window width
xpos1the last result of the measure with the mouse (1. X axis)
xpos2the last result of the measure with the mouse (2. X axis)
ypos1the last result of the measure with the mouse (1. Y axis)
ypos2the last result of the measure with the mouse (2. Y axis)
xmin1min value of the 1. (bottom) X axis
xmax1max value of the 1. (bottom) X axis
ymin1min value of the 1. (left) Y axis
ymax1max value of the 1. (left) Y axis
xmin2min value of the 2. (top) X axis
xmax2max value of the 2. (top) X axis
ymin2min value of the 2. (right) Y axis
ymax2max value of the 2. (right) Y axis

Arguments

In the command descriptions on the following pages optional argument are written with surrounded square brackets ([argument]) and required arguments with angle brackets (<argument>).

There are also some special arguments:


<BUFFER>

a list of one or more data buffers. Possible values are:

allall buffers in the document
selectedselected buffers in the document
unselectedunselected buffers in the document
visiblevisible buffers in the document
hiddenhidden buffers in the document
noneno buffer
b1,b2,b3,...,bna list of buffers where the arguments may be math expressions.
bs..bebuffers from bs to be

<AXIS>

a definition for the four axis. Possible values are:

allall four axis
xboth X axis
yboth Y axis
11. X axis
21. Y axis
32. X axis
42. Y axis

<AXISGROUP>

the coordinate system:

0both axis
1first axis (left and bottom)
2second axis (right and top)

<COOR>

the coordinate system:

0screen coordinates
1first axis (left and bottom)
2second axis (right and top)

<RANGE>

a list of numbers (e.g. used for the loop command):

ndefines a range from 0 to n
from:to:stepdefines a range where the arguments may be math expressions.
b1,b2,b3,...,bna list of numbers where the arguments may be math expressions.
bs..benumbers from bs to be