# Introduction

Plot is a scientific 2D plotting program.

This project started in 1993 with SciPlot on NeXTStep and continues with "Plot" for OS X till 2007.

Plot is designed for everyday plotting, it is easy to use, it creates high quality plots, and it allows easy and powerful manipulations and calculations of data.

Basically Plot allows to work with multiple documents where every document consists of one or more XY data sets (called buffer in Plot).

There is also the possibility to add subviews (plots inside plots) to your document. A subview is completely independent with its own data buffers, graphic attributes etc.

Data can be imported from text or binary files, directly from a MySQL database or with a Perl based import filter. It is also possible to import data by using copy&paste or drag&drop from other programs.

Plot supports many plotting styles like lines, symbols, grids, bars, filled areas, sticks, dots, histograms, error bars, automatic legend, text and graphic objects, etc.

Plot can import images from other programs with copy&paste or drag&drop.

Plot has many data manipulation methods integrated: smooth, spline interpolation, differentiation, integration, normalizing, moving, data calculations, function generator, etc.

Plot has also a built in macro language for automating complex tasks.

Combined documentation: All in One
All macro comands: All Macro Command
Macro short reference: Macro Reference

# Data Views

The right part oft the toolbar switches the different views in the lower right part of the inspector.

## Data Buffer Inspector

This inspector controls the data buffers in your document. Each line represents a set of XY data. It is possible to select some buffers and transfer them via copy and paste to another Plot document.

## Data Inspector

The Data View is a spreadsheet like editor for your data. It shows the data of the working buffer. Double clicking on the X Value or Y Value column header switches the display format between number and time values. The X Error and Y Error column stores individual error values for each data point. If you select rows in the Data View the points will be highlighted in your document.

## Macro editor

Switch to the macro editor.

## MySQL import editor

Switch to the MySQL import editor

# Inspectors

The left part of the toolbar selects the inspector panes.

## General

This inspector controls some general attributes of your document

## Data Style Inspector

The Data Style Inspector controls the graphic attributes of each data buffer.

## Extra Style Inspector

The Extra Style Inspector controls some advanced style attributes of each data buffer.

## Axis Inspector

The Axis Inspector allows settings depending to the 4 available axis. The button at the top of the inspector selects on which axis the attributes below apply to.

## Axis Format Inspector

The Axis Format Inspector controls the graphic attributes of the 4 available axis. The button at the top of the inspector selects on which axis the attributes below apply to.

## Axis Labels Inspector

The Axis Labels Inspector controls the axis label attributes and allows to assign arbitrary labels instead of the automatically generated numbers. The button at the top of the inspector selects on which axis the attributes below apply to.

## Error Bars Inspector

The Error Bars Inspector controls the error bars for your data points.

## Legend Inspector

The Legend Inspector sets the attributes for the automatically generated legend. Only buffers with a checked L column in the Data Inspector appears in the legend.

## Calculations Inspector

This inspector contains the function generator and the calculator which allows buffer calculations

## Normalize Inspector

With this inspector some manipulation of data like moving, normalizing etc. can be done.

## Fit Inspector

With this inspector some mathematical manipulation of data can be done.

## Text Inspector

This inspector controls the graphical attributes of text objects.

## Graphic Inspector

This inspector controls the graphical attributes of graphic objects. Currently lines, arrows, rectangle, and circles are supported.

# Mouse Modes

The middle part of the inspector toolbar allows to select different mouse modes. Mouse modes defines the behavior of the mouse in your document.

## Select Tool

This mouse mode allows different manipulations on your plot. You can resize the frame of your plot; move and edit texts; select data points which will then highlighted in the data view; change the current working buffer; and select axis. After selection the appropriate inspector appears. If you select a text or graphic object you can use this keys:

left, right, up, down | move the object
control + left, right, up, down | move the 1. graphic object handle
option + left, right, up, down | move the 2. graphic object handle
backspace | delete the object
command+right, command+left | select the next or previous object

Keyboard shortcut: `s`

## Range

This is for easy navigating through your data. Clicking and moving in the plot changes the range accordingly. If you have a mouse wheel you can also zoom in and out. If you hold the option keys while zooming only the X axis changes. Holding the command key does the same for the Y axis.
Keyboard shortcut: `r`

## Zoom

Zooming, the plot will be rescaled to the selected rectangle.
Keyboard shortcut: `z`

## Upscale

If you click with this mouse mode inside your plot the clicked point will be centered and the range of the plot will be lowered.
Keyboard shortcut: `u`

## Downscale

If you click with this mouse mode inside your plot the clicked point will be centered and the range of the plot will be increased.
Keyboard shortcut: `d`

## Measure

This mode allow to measure points and the distance between two points with a crosshair. The result will be shown in the middle part of the inspector. The values will be displayed for both axis and depending on the axis mode as time value or as number.
Keyboard shortcut: `m`

## Normalize Y

With this mouse mode two reference values on the Y axis can be selected. The values will be used for the normalize inspector.
Keyboard shortcut: `b`

## Normalize X

With this mouse mode two reference values on the X axis can be selected. The values will be used for the normalize inspector.
Keyboard shortcut: `n`

## Move Y

This mouse mode allows moving of data from all selected buffers in Y direction. This operation changes the data itself and not just the range of the plot.
Keyboard shortcut: `y`

## Move X

This mouse mode allows moving of data from all selected buffers in X direction. This operation changes the data itself and not just the range of the plot.
Keyboard shortcut: `x`

## Move XY

This mouse mode allows moving of data from all selected buffers in X and Y direction. This operation changes the data itself and not just the range of the plot.
Keyboard shortcut: `q`

## Move Points

With this mouse mode you can select and move a single data point. This operation changes the data itself and not just the range of the plot.
Keyboard shortcut: `p`

## Linear Background

Allows to define the reference values for linear background subtraction with the mouse.
Keyboard shortcut: `w`

## Subview

With this mouse mode new empty subviews can be generated.
Keyboard shortcut: `h`

## Change Subview

This mouse mode allows to change the size and position of a subview.
Keyboard shortcut: `j`

## Legend Moving

With this mouse mode the automatically generated legend can be moved.
Keyboard shortcut: `l`

## Graphic

With this mouse mode graphic objects can be created, sized and moved.
Keyboard shortcut: `g`

## Text

This mouse mode allows to add and edit text objects in your plot.
Keyboard shortcut: `t`

# Other

## Rescale

Rescales the plot so that every data point is visible.

## Upscale

The range of the plot will be lowered.

## Downscale

The range of the plot will be increased.

# Time Format

Plot stores time data as the number of seconds relative to an absolute reference time: the first instant of 1 January, 2001, Greenwich Mean Time (GMT). Dates before then are stored as negative numbers; dates after then are stored as positive numbers.

To convert a UNIX time to a Plot time simply subtract 978307200.0 from the UNIX time.

## Time format tokens

Field | Sym. | No. | Example | Description
era | G | 1..3 | AD | Era - Replaced with the Era string for the current date. One to three letters for the abbreviated form, four letters for the long form, five for the narrow form.
4 | Anno Domini
5 | A
year | y | 1..n | 1996 | Year. Normally the length specifies the padding, but for two letters it also specifies the maximum length. Example:
Year | y | yy | yyy | yyyy | yyyyy
AD 1 | 1 | 01 | 001 | 0001 | 00001
AD 12 | 12 | 12 | 012 | 0012 | 00012
AD 123 | 123 | 23 | 123 | 0123 | 00123
AD 1234 | 1234 | 34 | 1234 | 1234 | 01234
AD 12345 | 12345 | 45 | 12345 | 12345 | 12345
Y | 1..n | 1997 | Year (in "Week of Year" based calendars). Normally the length specifies the padding, but for two letters it also specifies the maximum length. This year designation is used in ISO year-week calendar as defined by ISO 8601, but can be used in non-Gregorian based calendar systems where week date processing is desired. May not always be the same value as calendar year.
u | 1..n | 4601 | Extended year. This is a single number designating the year of this calendar system, encompassing all supra-year fields. For example, for the Julian calendar system, year numbers are positive, with an era of BCE or CE. An extended year value for the Julian calendar system assigns positive values to CE years and negative values to BCE years, with 1 BCE being year 0.
U | 1..3 | 甲子 | Cyclic year name. Calendars such as the Chinese lunar calendar (and related calendars) and the Hindu calendars use 60-year cycles of year names. Use one through three letters for the abbreviated name, four for the full name, or five for the narrow name (currently the data only provides abbreviated names, which will be used for all requested name widths). If the calendar does not provide cyclic year name data, or if the year value to be formatted is out of the range of years for which cyclic name data is provided, then numeric formatting is used (behaves like 'y').
4 | (currently also 甲子)
5 | (currently also 甲子)
quarter | Q | 1..2 | 02 | Quarter - Use one or two for the numerical quarter, three for the abbreviation, or four for the full name.
3 | Q2
4 | 2nd quarter
q | 1..2 | 02 | Stand-Alone Quarter - Use one or two for the numerical quarter, three for the abbreviation, or four for the full name.
3 | Q2
4 | 2nd quarter
month | M | 1..2 | 09 | Month - Use one or two for the numerical month, three for the abbreviation, four for the full name, or five for the narrow name.
3 | Sept
4 | September
5 | S
L | 1..2 | 09 | Stand-Alone Month - Use one or two for the numerical month, three for the abbreviation, or four for the full name, or 5 for the narrow name.
3 | Sept
4 | September
5 | S
l | 1 | (nothing) | This pattern character is deprecated, and should be ignored in patterns. It was originally intended to be used in combination with M to indicate placement of the symbol for leap month in the Chinese calendar. Placement of that marker is now specified using locale-specific <monthPatterns> data, and formatting and parsing of that marker should be handled as part of supporting the regular M and L pattern characters.
week | w | 1..2 | 27 | Week of Year.
W | 1 | 3 | Week of Month
day | d | 1..2 | 1 | Date - Day of the month
D | 1..3 | 345 | Day of year
F | 1 | 2 | Day of Week in Month. The example is for the 2nd Wed in July
g | 1..n | 2451334 | Modified Julian day. This is different from the conventional Julian day number in two regards. First, it demarcates days at local zone midnight, rather than noon GMT. Second, it is a local number; that is, it depends on the local time zone. It can be thought of as a single number that encompasses all the date-related fields.
week day | E | 1..3 | Tues | Day of week - Use one through three letters for the short day, or four for the full name, five for the narrow name, or six for the short name.
4 | Tuesday
5 | T
6 | Tu
e | 1..2 | 2 | Local day of week. Same as E except adds a numeric value that will depend on the local starting day of the week, using one or two letters. For this example, Monday is the first day of the week.
3 | Tues
4 | Tuesday
5 | T
6 | Tu
c | 1 | 2 | Stand-Alone local day of week - Use one letter for the local numeric value (same as 'e'), three for the short day, four for the full name, five for the narrow name, or six for the short name.
3 | Tues
4 | Tuesday
5 | T
6 | Tu
period | a | 1 | AM | AM or PM
hour | h | 1..2 | 11 | Hour [1-12]. When used in skeleton data or in a skeleton passed in an API for flexible date pattern generation, it should match the 12-hour-cycle format preferred by the locale (h or K); it should not match a 24-hour-cycle format (H or k). Use hh for zero padding.
H | 1..2 | 13 | Hour [0-23]. When used in skeleton data or in a skeleton passed in an API for flexible date pattern generation, it should match the 24-hour-cycle format preferred by the locale (H or k); it should not match a 12-hour-cycle format (h or K). Use HH for zero padding.
K | 1..2 | 0 | Hour [0-11]. When used in a skeleton, only matches K or h, see above. Use KK for zero padding.
k | 1..2 | 24 | Hour [1-24]. When used in a skeleton, only matches k or H, see above. Use kk for zero padding.
j | 1..2 | n/a | This is a special-purpose symbol. It must not occur in pattern or skeleton data. Instead, it is reserved for use in skeletons passed to APIs doing flexible date pattern generation. In such a context, it requests the preferred hour format for the locale (h, H, K, or k), as determined by whether h, H, K, or k is used in the standard short time format for the locale. In the implementation of such an API, 'j' must be replaced by h, H, K, or k before beginning a match against availableFormats data. Note that use of 'j' in a skeleton passed to an API is the only way to have a skeleton request a locale's preferred time cycle type (12-hour or 24-hour).
minute | m | 1..2 | 59 | Minute. Use one or two for zero padding.
second | s | 1..2 | 12 | Second. Use one or two for zero padding.
S | 1..n | 3456 | Fractional Second - truncates (like other time fields) to the count of letters. (example shows display using pattern SSSS for seconds value 12.34567)
A | 1..n | 69540000 | Milliseconds in day. This field behaves exactly like a composite of all time-related fields, not including the zone fields. As such, it also reflects discontinuities of those fields on DST transition days. On a day of DST onset, it will jump forward. On a day of DST cessation, it will jump backward. This reflects the fact that is must be combined with the offset field to obtain a unique local time value.
zone | z | 1..3 | PDT | The short specific non-location format. Where that is unavailable, falls back to the short localized GMT format ("O").
4 | Pacific Daylight Time | The long specific non-location format. Where that is unavailable, falls back to the long localized GMT format ("OOOO").
Z | 1..3 | -0800 | The ISO8601 basic format with hours, minutes and optional seconds fields. The format is equivalent to RFC 822 zone format (when optional seconds field is absent). This is equivalent to the "xxxx" specifier.
4 | GMT-8:00 | The long localized GMT format. This is equivalent to the "OOOO" specifier.
5 | -08:00 -07:52:58 | The ISO8601 extended format with hours, minutes and optional seconds fields. The ISO8601 UTC indicator "Z" is used when local time offset is 0. This is equivalent to the "XXXXX" specifier.
O | 1 | GMT-8 | The short localized GMT format.
4 | GMT-08:00 | The long localized GMT format.
v | 1 | PT | The short generic non-location format. Where that is unavailable, falls back to the generic location format ("VVVV"), then the short localized GMT format as the final fallback.
4 | Pacific Time | The long generic non-location format. Where that is unavailable, falls back to generic location format ("VVVV").
V | 1 | uslax | The short time zone ID. Where that is unavailable, the special short time zone ID unk (Unknown Zone) is used. Note: This specifier was originally used for a variant of the short specific non-location format, but it was deprecated in the later version of this specification. In CLDR 23, the definition of the specifier was changed to designate a short time zone ID.
2 | America/Los_Angeles | The long time zone ID.
3 | Los Angeles | The exemplar city (location) for the time zone. Where that is unavailable, the localized exemplar city name for the special zone Etc/Unknown is used as the fallback (for example, "Unknown City").
4 | Los Angeles Time | The generic location format. Where that is unavailable, falls back to the long localized GMT format ("OOOO"; Note: Fallback is only necessary with a GMT-style Time Zone ID, like Etc/GMT-830.) This is especially useful when presenting possible timezone choices for user selection, since the naming is more uniform than the "v" format.
X | 1 | -08 +0530 Z | The ISO8601 basic format with hours field and optional minutes field. The ISO8601 UTC indicator "Z" is used when local time offset is 0. (The same as x, plus "Z".)
2 | -0800 Z | The ISO8601 basic format with hours and minutes fields. The ISO8601 UTC indicator "Z" is used when local time offset is 0. (The same as xx, plus "Z".)
3 | -08:00 Z | The ISO8601 extended format with hours and minutes fields. The ISO8601 UTC indicator "Z" is used when local time offset is 0. (The same as xxx, plus "Z".)
4 | -0800 -075258 Z | The ISO8601 basic format with hours, minutes and optional seconds fields. The ISO8601 UTC indicator "Z" is used when local time offset is 0. (The same as xxxx, plus "Z".) Note: The seconds field is not supported by the ISO8601 specification.
5 | -08:00 -07:52:58 Z | The ISO8601 extended format with hours, minutes and optional seconds fields. The ISO8601 UTC indicator "Z" is used when local time offset is 0. (The same as xxxxx, plus "Z".) Note: The seconds field is not supported by the ISO8601 specification.
x | 1 | -08 +0530 | The ISO8601 basic format with hours field and optional minutes field. (The same as X, minus "Z".)
2 | -0800 | The ISO8601 basic format with hours and minutes fields. (The same as XX, minus "Z".)
3 | -08:00 | The ISO8601 extended format with hours and minutes fields. (The same as XXX, minus "Z".)
4 | -0800 -075258 | The ISO8601 basic format with hours, minutes and optional seconds fields. (The same as XXXX, minus "Z".) Note: The seconds field is not supported by the ISO8601 specification.
5 | -08:00 -07:52:58 | The ISO8601 extended format with hours, minutes and optional seconds fields. (The same as XXXXX, minus "Z".) Note: The seconds field is not supported by the ISO8601 specification.

## Old time format tokens

This is only used if your time format contains at least one %. You should not use this syntax, it is only available for compatibility with older files

%a | Abbreviated weekday name
%A | Full weekday name
%b | Abbreviated month name
%B | Full month name
%c | Shorthand for “x", the locale format for date and time
%d | Day of the month as a decimal number (01-31)
%e | Same as %d but does not print the leading 0 for days 1 through 9 (unlike strftime(), does not print a leading space)
%F | Milliseconds as a decimal number (000-999)
%H | Hour based on a 24-hour clock as a decimal number (00-23)
%I | Hour based on a 12-hour clock as a decimal number (01-12)
%j | Day of the year as a decimal number (001-366)
%m | Month as a decimal number (01-12)
%M | Minute as a decimal number (00-59)
%p | AM/PM designation for the locale
%S | Second as a decimal number (00-59)
%w | Weekday as a decimal number (0-6), where Sunday is 0
%x | Date using the date representation for the locale, including the time zone (produces different results from strftime())
%X | Time using the time representation for the locale (produces different results from strftime())
%y | Year without century (00-99)
%Y | Year with century (such as 1990)
%Z | Time zone name (such as Pacific Daylight Time; produces different results from strftime())
%z | Time zone offset in hours and minutes from GMT (HHMM)

# Preferences

The Preferences Panel allow to change some global setting in Plot

Open Initial Empty Document: If checked Plot starts with an empty document.

Hide Document Toolbar: If check the document title bar has no toolbar.

Time Format: Set the default format for time values used in Plot.

Default Font: Set the default fonts for axis labels and axis numbers.

Set Default Style: If clicked the style of the current working buffer in the current document will be the default style for newly generated data buffers.

Colors: Here you can define your own default colors used by Plot. It is also possible to restore the default colors provided by Plot.

# ASCII Import

Generally the ASCII import filter accepts files with UNIX, Mac and Windows line end characters. Each line should contain at least one number. Numbers in the line will be separated by any character(s) which could not be part of a number.

Plot can also detect time values if they appear at the beginning of a text line. The following time formats will be detected automatically and treated as x values:

yyyy-MM-dd HH:mm:ss | 2014-03-22 11:16:00
yyyy-MM-dd HH:mm:ss.S | 2014-03-22 11:16:00.834
yyyy-MM-dd HH:mm | 2014-03-22 11:16
MM/dd/yyyy HH:mm:ss | 03/22/2014 11:16:00
MM/dd/yyyy HH:mm:ss.S | 03/22/2014 11:16:00.834
MM/dd/yyyy HH:mm | 03/22/2014 11:16
dd.MM.yyyy HH:mm:ss | 22.03.2014 11:16:00
dd.MM.yyyy HH:mm:ss.S | 22.03.2014 11:16:00.834
dd.MM.yyyy HH:mm | 22.03.2014 11:16
yyyy-MM-dd | 2014-03-22
MM/dd/yyyy | 03/22/2014
dd.MM.yyyy | 22.03.2014
HH:mm:ss | 11:16:00
HH:mm:ss.S | 11:16:00.834
HH:mm | 11:16

If the Plot builtin import filter is not able to import your data file you can build your own Perl based import filter.

The import dialog allows to select different options for ASCII import.

Import Mode

Multicolumn: The built in import filter expects an ASCII file with one or more columns. If no field separator is specified columns will be separated by any character sequence which can not be part of a number.
Error Values: This mode expects up to 4 columns of data. The 1. and 2. will be treated as X and Y values. The 3. and 4. as X error values and Y error values. If only three columns are available the 3. will used as Y error values.

Treat period as separator: If checked treat period as field separator. Has only effect if the Field Separator option is empty.

Treat comma as separator: If checked treat comma as field separator. Has only effect if the Field Separator option is empty.

Field Separator: Defines the field separator for ASCII import. Explicit definition of the separator allows to import files with empty fields.

Ignore Lines Containing: Lines in your data file which contains this string will be ignored.

Comment Character Sequence: Anything in a line behind this string will be ignored.

Ignore leading white spaces: If checked leading white spaces in lines will be ignored

Ignore lines which not begin with a number: If checked only lines beginning with a number will be processed.

Disable Time Import: If checked Plot will not try to detect time values. This can speed up import off large files.

Custom Time Format: Enable this if the automatic time value detection don't work and enter your custom time format.

Timezone: Set the timezone for time values.

X Column: Defines which column should be the X column starting with 1 for the first column.

Treat all columns as Y values: If checked, all columns will be interpreted as Y values and the X values will be generated as sequence number. This allows also to import files which have only one column.

# Binary Import Filter

Plot allows importing of binary data. This can be done by selecting Binary Import from the File menu. In the open panel you have to select your binary file and to provide some extra informations.

Data type: Specifies the type of date in your file. Valid type are double (64 bit), float (32 bit), integer (32 bit) or integer (16 bit).

Import mode: Defines how the data are ordered in you file. Column mode expects data ordered in columns and Block mode expects a block for each column.

Swap byteorder: Allows to swap data which are generated on a platform with different byte order.

Columns: The number of columns in your file (has to be at least 1). If your file has only one column the values will be treated as Y values, the X value will be generated as sequence number. If you have more than one column the first will be treated as X value and every other column as Y value.

# Perl Import Filter

Perl based import filter can be very useful to import files with unusual data format. Plot builds an easy to access framework around your script which allow to pass the data to Plot. Errors produced by the script will be shown in the console of the inspector.

To create a Perl import filter open the macro editor, choose Add in the panel, and select Perl Import as type. In the large text field of the macro editor you can now enter your script.

## Predefinitions

The following variables and subroutines are available in your Perl import filter:

`$file`

The filename of the file you want to import.

`&log()`

Send output to the console in the macro editor.

`@data[buffer][point number][column]`

A three dimensional array which should contain the data at the end of your script.
`[buffer]`: The number of the buffer (starting with 0)
`[point number]`: The number of the data points (starting with 0)
`[column]`: The column number (0 = X value, 1 = Y value, 2 = X error, 3 = Y error)

`@comment[buffer]`

In this array you can set comments for each imported buffer.

`@source[buffer]`

In this array you can set source information for each imported buffer.

`%var{key}`

If the script is started from a macro this hash contains all number variables. The variables will also be returned to the macro.

`%svar{key}`

If the script is started from a macro this hash contains all string variables. The variables will also be returned to the macro.

## Restrictions

- Do not send anything to STDERR and STDOUT.
- Do not use any interactive things.

## Example

The following example demonstrates how to import a file containing two columns separated by `<Tab>`. The script also checks for the correct number of columns and sets the buffer comment.

     open(IN,$file);
     $n=0;
     while(<IN>) {
       @tmp=split('\t');
       if ($#tmp==1) {
         $data[0][$n][0]=$tmp[0];
         $data[0][$n][1]=$tmp[1];
         $n++
       }
     }
     close(IN);
     $comment[0]='Test';
     &log("$n number of points");

# Command Line Options

Plot support some command line options even if none interactive usage is not the focus of Plot.

-i <filename>
  Import the file and treat as multicolumn ASCII input.
-m <macro filename>
  Execute the content of the given filename as macro.
-f <filename>
  Provide a filename to the macro (-m). The Filename will be stored in `$file`.
-h <yes/no>
  If yes hide all windows.
-q <yes/no>
  If yes terminate Plot after macro execution.

Note: commandline options does not fully work with the Plot2 version from the AppStore. Use the download version instead.
http://apps.micw.org/apps/plot2/downloads.php

Example: If you want to import a ASCII file and save the figure as PNG file make a macro file in you favorite text editor like this:

     import /Users/mike/Desktop/test.dat 0
     savepng /Users/mike/Desktop/test.png

and enter in you terminal something like this:

     /Applications/Plot.app/Contents/MacOS/Plot -m import.macro -q yes -h yes

# Data Buffer Inspector

The Data Buffer Inspector controls the data buffer in your document. Each line represents a set of XY data. It is possible to select some buffers and transfer them via copy and paste to another Plot document.

The columns in the Data Buffer Inspector show all important data about the buffer and allow some changes:

1. column: In this column appears an arrow which indicates the working buffer, e.g. if you select the Data Style Inspector it show the attributes of the buffer with the arrow in front. Changing the working buffer is done by double clicking in this column.

No column: The number of the buffer. The buffer number can be useful for macro programming.

X column: Shows if the buffer belongs to the first (left) X axis or to the second (right) X axis of the plot. Can be changed by double clicking the column. If this column shows a ∞ the buffer does not depend to an axis.

Y column: Shows if the buffer belongs to the first (bottom) Y axis or to the second (top) Y axis of the plot. Can be changed by double clicking the column. If this column shows a ∞ the buffer does not depend to an axis.

E column: This column indicates that the buffer contains error values.

Points column: Number of data points in the buffer.

Source column: The source of the data. This column is editable.

L column: If checked the buffers comment will be shown in the automatically generated legend. You can change the state by double clicking the column.

Comment column: As the name says. This column is editable.

At the top of this inspector appears a gallery of buttons:

Up, Down: with this buttons you can move the current working buffer up and down. The order in the Data inspector is also the order in which the buffer will be plotted and changing the order may also change the appearance of your document.

Show Sel.: Shows only selected buffers

Hide Sel.: Hide only selected buffers.

Invert Sel.: Inverts the buffer selection

Sel. None: Unselect all buffers.

Select All: Select all buffers.

Duplicate: duplicate all selected buffers.

Delete: delete all selected buffers.

Hide and Show hides or shows all selected buffers. Hidden buffers will not displayed but the data are still available for later use. The hide/show state of a buffer can also be changed by double clicking the Points or No column.

The 1.Axis, 2.Axis, both: switch defines if operations like rescale take effect on both axis or only on one of them.

# Data Inspector

The Data Inspector is a spreadsheet like editor for your data. It shows the data of the working buffer.

Double clicking on the X Value or Y Value column header switches the display format between number and time values.

The X Error and Y Error column stores individual error values for each data point.

If you select rows in the Data View the points will be highlighted in your document.

The two arrow buttons at the bottom allow to switch between different data buffers.

# Macro Editor

Plot has a build in programing interface which allow editing of three different types of programs.

Built in Plot macro language
  Plot has its own programming language with ~ 220 commands. This can be used to automate complex tasks.
Perl based import filter
  Perl based import filter can be very useful to import files with unusual data format. Plot builds an easy to access framework around your script which allow to pass the data to Plot.
Perl based data filter
  Perl based data filter passes all selected buffers to a Perl script where the data can be manipulated. When the script has finished the data will be returned to Plot as new data buffers.

The interface is the same for all of them. It is possible to call the Perl programs from the Plot macro language and also to add inline Perl scripts.

The big text field contain the macro itself. The small text field is the output console where messages or debug info can be printed. The list on the left contains your macros.

# MySQL Import Editor

The MySQL import editor allow direct import of data from a MySQL database. In the upper field of the panel you have to define the database parameters. The list on the left contains all your MySQL queries.

Typically you enter MySQL query in the form:

`SELECT <x column>,<y column> FROM <table> WHERE ...`

# Macro Language

## Introduction

There are ~ 230 commands, ~55 math functions and ~90 constants available in the Plot macro language. Most of the commands need one or more argument. Simply enter the command followed by the arguments separated by spaces. Multiple commands in one line must be separated with `:`. 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 xb 'Axis Text'`
`clr: list: exit`

This command sets the axis text label for the first (bottom) X axis.

Note: some macro commands does not fully work with the Plot2 version from the AppStore. Use the download version instead.
http://apps.micw.org/apps/plot2/downloads.php

## Variables

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

`cb` | number of the current working buffer in the document
`$date` | the current date
`$document` | the filename of the current document
`dx1` | the distance between the last two measures with the mouse (1. X axis)
`dx2` | the distance between the last two measures with the mouse (2. X axis)
`dy1` | the distance between the last two measures with the mouse (1. Y axis)
`dy2` | the distance between the last two measures with the mouse (2. Y axis)
`$file` | the filename from the `browse` command
`framebottom` | the position of bottom frame line
`frameleft` | the position of left frame line
`frameright` | the position of right frame line
`frametop` | the position of top frame line
`framewidth` | the width of the frame
`$home` | the users home directory
`input` | the result of the last input command
`$input` | the result of the last input command as string
`integral` | the result from the last `calcint` command
`l` | the run variable for loops
`lx` | the X value during a data loop
`ly` | the Y value during a data loop
`lxe` | the X error value during a data loop
`lye` | the X error value during a data loop
`lastbuffer` | the number of the last buffer generated by one of the calculation commands
`marginbottom` | the bottom margin
`marginleft` | the left margin
`marginright` | the right margin
`margintop` | the top margin
`nb` | number of data buffer in the document
`option` | the result of the `askoption` command
`ref1` | the 1. reference value
`ref2` | the 2. reference value
`linbga`, `linbgb` | the reference values for linear background subtraction
`rega`, `regb`, `regr` | the result of the last regression
`textheight` | the height of the last added text
`textwidth` | the width of the last added text
`$time` | the current time
`$user` | the user name
`viewheight` | the height of the current view
`viewwidth` | the width of the current view
`windowheight` | the window height
`windowwidth` | the window width
`xpos1` | the last result of the measure with the mouse (1. X axis)
`xpos2` | the last result of the measure with the mouse (2. X axis)
`ypos1` | the last result of the measure with the mouse (1. Y axis)
`ypos2` | the last result of the measure with the mouse (2. Y axis)
`xmin1` | min value of the 1. (bottom) X axis
`xmax1` | max value of the 1. (bottom) X axis
`ymin1` | min value of the 1. (left) Y axis
`ymax1` | max value of the 1. (left) Y axis
`xmin2` | min value of the 2. (top) X axis
`xmax2` | max value of the 2. (top) X axis
`ymin2` | min value of the 2. (right) Y axis
`ymax2` | max value of the 2. (right) Y axis
`ut` | the number of seconds from the reference date (00:00:00 UTC on 1 January 1970), aka unix timestamp
`mt` | the number of seconds from the absolute reference date (00:00:00 UTC on 1 January 2001)

## Arguments

In the command descriptions on the following pages optional argument is written with surround 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:

`all` | all buffers in the document
`selected` | selected buffers in the document
`unselected` | unselected buffers in the document
`visible` | visible buffers in the document
`hidden` | hidden buffers in the document
`none` | no buffer
`b1,b2,b3,...,bn` | a list of buffers where the arguments may be math expressions.
`bs..be` | buffers from bs to be

`<AXIS>`

A definition of the four axis. Possible values are:

`all` | all four axis
`x` | both X axis
`y` | both Y axis
`1, x1, xb, bottom` | 1. X axis (bottom)
`2, y1, yl, left` | 1. Y axis (left)
`3, x2, xt, top` | 2. X axis (top)
`4, y2, yr, right` | 2. Y axis (right)

`<AXISGROUP>`

The coordinates system:

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

`<COOR>`

The coordinates system:

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

`<RANGE>`

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

`n` | defines a range from 0 to n
`from;to;step` | defines a range where the arguments may be math expressions.
`b1,b2,b3,...,bn` | a list of numbers where the arguments may be math expressions.
`bs..be` | numbers from bs to be

`<COLOR>`

This can be a hexadecimal color definition in the format RGB, ARGB, RRGGBB or AARRGGBB where R is red, G is green, B is blue and A is alpha.

There are also named colors which can be used: black, white, red, green, blue, orange, yellow, magenta, cyan, aluminum, aqua, asparagus, banana, blueberry, bubblegum, cantaloupe, carnation, cayenne, clover, eggplant, fern, flora, grape, honeydew, ice, iron, lavender, lead, lemon, licorice, lime, magnesium, maraschino, maroon, mercury, midnight, mocha, moss, nickel, ocean, orchid, plum, salmon, seafoam, silver, sky, snow, spindrift, spring, steel, strawberry, tangerine, teal, tin, tungsten, turquoise

The Plot default colors can be addressed with the numbers 0-15

# Macro Language: Range Commands

`range <AXIS> <min> <max>`

Sets the axis min and max.

`rescale [AXISGROUP]`

Rescales the plot so that every data point is visible.

`upscale <AXISGROUP> [factor]`

Lowers the range of the plot by the given factor (default=10).

`downscale <AXISGROUP> [factor]`

Increase the range of the plot by the given factor (default=10).

# Macro Language: Buffer Commands

`select <BUFFER>`

Select data buffers.

`setcurrent <number>`

Defines the current working buffer.

`invertselection`

Inverts the selection of data buffers.

`hide <BUFFER>`

Hide buffers.

`show <BUFFER>`

Show buffers.

`delete <BUFFER>`

Delete buffers.

`duplicate <BUFFER>`

Duplicate buffers.

`setcomment <BUFFER> <text>`

Set the comment field of buffers.

`addcomment <BUFFER> <text>`

Add text to the comment field of buffers.

`getcomment <buffer> $<var>`

Defines a string variable with the comment field of the buffer.

`setsource <BUFFER> <text>`

Set the source field of buffers.

`addsource <BUFFER> <text>`

Add text to the source field of buffers.

`getsource <buffer> $<var>`

Defines a string variable with the source field of the buffer.

`belongx <BUFFER> <axis>`

Defines if the buffers belong to the 1. (bottom) or the 2. (top) X axis (possible values: 1, 2, bottom, top).

`belongy <BUFFER> <axis>`

Defines if the buffers belong to the 1. (left) or the 2. (right) Y axis (possible values: 1, 2, left, right).

`addvalue <buffer> <x value> <y value> <x error> <y error>`

Add value pair to data buffer.

`setxvalue <buffer> <index> <value>`

Set X value in the data buffer.

`setxerror <buffer> <index> <value>`

Set X error in the data buffer.

`setyvalue <buffer> <index> <value>`

Set the Y value in the data buffer.

`setyerror <buffer> <index> <value>`

Set Y error in the data buffer.

`rmvalue <buffer> <index>`

Delete value from the data buffer.

`newbuffer`

Add a new empty buffer to the document.

`moveup <BUFFER>`

move the buffer up in the drawing order.

`movedown <BUFFER>`

move the buffer down in the drawing order.

# Macro Language: Control Commands

`if <expr> <operator> <expr>`
`else`
`endif`

Executes the commands between `if ...` and `else` if the condition is true. If the condition is false it executes the commands between `else` and `endif`. Possible operators are `==`, `!=`, `>`, `<`, `>=`, `<=` for numerical comparison and `eq`, `ne` for string comparison. It is not possible to define if,else,endif statements inside another `if`, `else`, `endif` statements.

`loop <RANGE>`

Starts a loop for the given range. The running variable for the loop command is `l`. It is not possible to define loops inside another loop.

`bufferloop <BUFFER>`

Starts a loop for the given buffer numbers. The running variable for the loop command is `l`. It is not possible to define buffer loops inside another loop.

`dataloop <buffer>`

Starts a loop for all data points in the given buffer. The running variable for the loop command is `l`, in this case the same as the point number in the buffer. During the loop the variables `lx`, `ly`, `lxe`, `lye` contains the values of the corresponding data point. It is not possible to define data loops inside another loop.

`endloop`

The endpoint of a `loop`, `bufferloop` or `dataloop` command.

`timer <interval> [count]`

Set a timer on the current macro. The macro will be executed every <interval> seconds. With [count] the timer can be stopped after that number of executions. The variable `timercount` contains a counter of executions.

`stoptimer`

Stop a running timer.

`perltimeout <seconds>`

Set the timeout for inline Perl execution in macros. Default is 10 seconds.

# Macro Language: Interactive Commands

`ask <text>`

This command stops the macro, shows an alert box, displays the `text`, and let you choose to stop or continue the macro.

`askoption <text> <button1> <button0>`

This command stops the macro, shows an alert box, displays the `text`, and provide two buttons. The result will be stored in the variable `option` (1 = `button1`, 0 = `button0`).

`browse`

Opens a panel for file selection. The selected filename will be stored in `$file`.

`input [text]`

This command brings up an input panel an let you enter a value. The value will be stored in variables `input` (numerical variable for expressions) and `$input` (string variable).

`print <argument> ...`

Print messages to the console window. The argument will be treated as an expression or a string.

`sleep <seconds>`

Stops the macro execution for the given time in seconds.

`setwarn <BOOL>`

Enable/Disable warnings.

# Macro Language: Calculation Commands

`fg <axis> <min> <max> <steps> <expr>`

Generate a function with the given parameters.
`<axis>`: The target axis (1 = X axis, 2 = Y axis)
`<min>`, `<max>`: The range of the new generated function.
`<steps>`: Number of steps for the function.
`<expr>`: Expression which defines the function.

`bcalc <buffer1> <operator> <buffer2>`

Performs basic calculations between two buffers. This work also for buffers with different X axis and different numbers of data points. Only the overlapping area will be processed and missing points will be interpolated.
`<operator>`: + - * /

`calc <data> <expr> <BUFFER>`

Performs a calculation on the data in the buffers.
`<data>`: The target axis (1 = X values, 2 = Y values, 3 = X error, 4 = Y error)
`<expr>`: Expression which defines the calculation.

`swapxy <BUFFER>`

This function swaps the X and Y values. Error values will also be swapped if available.

`sortx <BUFFER>`

This function sorts the data by X values.

`sorty <BUFFER>`

This function sorts the data by Y values.

`normx <ref1> <ref2> <new1> <new2> <BUFFER>`

This function manipulates the buffers by stretching or shrinking along the X axis. The specified reference points in the data are changed in such a way that the `ref1` value becomes the `new1` value and the `ref2` value becomes the `new2` value.

`normy <ref1> <ref2> <new1> <new2> <BUFFER>`

This function manipulates the buffers by stretching or shrinking along the Y axis. The specified reference points in the data are changed in such a way that the `ref1` value becomes the `new1` value and the `ref2` value becomes the `new2` value.

`movex <from> <to> <BUFFER>`

This function moves the buffers on the X axis.

`movey <from> <to> <BUFFER>`

This function moves the buffers on the Y axis.

`cutoutsidex <min> <max> <BUFFER>`

This function delete all data points in the buffers which are not in the X range between `min` and `max`

`cutinsidex <min> <max> <BUFFER>`

This function delete all data points in the buffers which are in the X range between `min` and `max`

`cutoutsidey <min> <max> <BUFFER>`

This function delete all data points in the buffers which are not in the Y range between `min` and `max`

`cutinsidey <min> <max> <BUFFER>`

This function delete all data points in the buffers which are in the Y range between `min` and `max`

`calcint <min> <max> <BUFFER>`

Integrates the buffers and add the result to the comment field. The result of the last integration is stored in the variable `integral`.

`linreg <min> <max> <BUFFER>`

Perform a linear regression between `min` and `max`. The result of the last regression will be stored in the variables `rega`, `regb` and `regr`.

`logreg <min> <max> <BUFFER>`

Perform a logarithmic regression between `min` and `max`. The result of the last regression will be stored in the variables `rega`, `regb` and `regr`.

`expreg <min> <max> <BUFFER>`

Perform a exponential regression between `min` and `max`. The result of the last regression will be stored in the variables `rega`, `regb` and `regr`

`linbg <a> <b> <BUFFER>`

Perform a linear background subtraction (y=y+a+bx)

`smooth <factor> <BUFFER>`

This function uses `factor` as the effective smooth width and performs a least square smooth to reduce the noise on the buffer.

`fftsmooth <factor> <BUFFER>`

This function uses `factor` as the effective smooth width and performs an FFT based smooth to reduce the noise on the buffer.

`datareduction <n> <BUFFER>`

Sometimes it is useful to reduce a large number of data points which consist mainly of noise to a more practical amount of points. This function takes `n` points, builds the average, and replaces the n points with the new one.

`spline <points> <strength> <BUFFER>`

This function calculates a nonparametric cubic spline interpolation.
`<points>`: Defines the number of points which should be calculated for each interval.
`<strength>`: Defines the strength of the interpolation. 2 is in most cases a good choice.

`fft <windowing> <BUFFER>`

Performs a Fast Fourier Transform and generates a new buffer with the result.
`<windowing>`: 1=none, 2=Hanning, 3=Welch, 4=Parzen

`diff <interval> <BUFFER>`

Differentiate the buffers and generate new buffers with the result data.

`integrate <BUFFER>`

Integrates buffers and generate new buffers with the result data.

`setxval <BUFFER> <index> <value>`

Set the X value at the given index of the buffers.

`setyval <BUFFER> <index> <value>`

Set the Y value at the given index of the buffers.

`setxeval <BUFFER> <index> <value>`

Set the X error value at the given index of the buffers.

`setyeval <BUFFER> <index> <value>`

Set the Y error value at the given index of the buffers.

# Macro Language: Style Commands

`margins <left> <right> <bottom> <top>`

Defines the margins between window and frame.

`windowsize <width> <height>`

Defines the window size.

`drawbg <bool>`

Enable or disable background drawing (possible values: yes/no).

`drawmargin <bool>`

Enable or disable margin background drawing (possible values: yes/no).

`drawframe <bool>`

Enable or disable frame drawing (possible values: yes/no).

`bgcolor <c> <c> <c> [a]`
`bgcolor <COLOR>`

Defines the background color. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With `a` the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`margincolor <c> <c> <c> [a]`
`margincolor <COLOR>`

Defines the margin color. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With `a` the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`framecolor <c> <c> <c> [a]`
`framecolor <COLOR>`

Defines the frame color. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With `a` the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`framewidth <width>`

Defines the frame width.

`framestyle <style>`

Defines the frame style. (0=full frame, 1=line at X and Y axis, 2=draw a cross at 0).

`forceframe <bool>`

If enabled a full frame will always be drawn (possible values: yes/no).

`framearrows <bool>`

If enabled arrow will be drawn for frame style 1 and 2.

`crossarrows <type>`

Set where a cross axis should have arrows (possible values: min/max/both).

`framearrowsize <size>`

Defines the size of frame arrows.

`framearrowtype <type>`

Defines the frame arrow type (0=open, 1=closed, 2=bar).

# Macro Language: Data Style Commands

`bstyle <lines> <symblos> <fill> <ybars> <xbar> <ystick> <xstick> <dots> <hist> <fhist> <BUFFER>`

Enable or disable styles for data buffers. All styles can be combined (possible values: yes/no).

`bstyleclear <BUFFER>`

Removes all styles from buffer.

`bstylelines <bool> <BUFFER>`

Add or remove line style (possible values: yes/no).

`bstylesymbols <bool> <BUFFER>`

Add or remove symbol style (possible values: yes/no).

`bstylefill <bool> <BUFFER>`

Add or remove filled area style (possible values: yes/no).

`bstyleybars <bool> <BUFFER>`

Add or remove the Y bar style (possible values: yes/no).

`bstylexbars <bool> <BUFFER>`

Add or remove the X bars style (possible values: yes/no).

`bstyleysticks <bool> <BUFFER>`

Add or remove the Y stick style (possible values: yes/no).

`bstylexsticks <bool> <BUFFER>`

Add or remove the X sticks style (possible values: yes/no).

`bstyledots <bool> <BUFFER>`

Add or remove dot style (possible values: yes/no).

`bstylehist <bool> <BUFFER>`

Add or remove histogram style (possible values: yes/no).

`bstylefhist <bool> <BUFFER>`

Add or remove filled histogram style (possible values: yes/no).

`bcolor <c> <c> <c> <BUFFER> [a]`
`bcolor <COLOR> <BUFFER>`

Defines the color for buffers. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With `a` the alpha value can be defined (default is 1.0).

`bfillcolor <c> <c> <c> <BUFFER> [a]`
`bfillcolor <COLOR> <BUFFER>`

Defines the color for the fill style. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With `a` the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`bbarcolor <c> <c> <c> <BUFFER> [a]`
`bbarcolor <COLOR>`

Defines the color for bars. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With `a` the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`bstickcolor <c> <c> <c> <BUFFER> [a]`
`bstickcolor <COLOR> <BUFFER>`

Defines the stick color. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With `a` the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`blinewidth <linewidth> <BUFFER>`

Defines the line width for buffers.

`blinepattern <pattern> <BUFFER>`

Defines the dash pattern for buffers (0-15).

`bpatternwidth <patternwidth> <BUFFER>`

Defines the width of dash pattern.

`bsymbol <symbol> <BUFFER>`

Define the symbols for buffers (0-15).

`bsymbolsize <symbolsize> <BUFFER>`

Defines the symbol size for buffers.

`bsymbolfill <bool> <BUFFER>`

If true symbols (0-6) will be filled with the fill color instead of the background color.

`bsticksize <sticksize> <BUFFER>` Set the stick size

`bsticksabs <bool> <BUFFER>`

Defines if the stick size should be an absolute value or not (possible values: yes/no).

`bdynsize <BUFFER> [expr]`

Sets an expression which defines the size of symbols or the length of sticks.

`bxerrorval <error> <BUFFER>`

Defines the value for X error bars.

`bxerror <type> <BUFFER>`

Defines the X error bar type (0=off, 1=absolute, 2=relative, 3=form data).

`byerrorval <error> <BUFFER>`

Defines the value for Y error bars.

`byerror <type> <BUFFER>`

Defines the Y error bar type (0=off, 1=absolute, 2=relative, 3=form data).

`berrorlinewidth <linewidth> <BUFFER>`

Defines the line width for error bars.

`berrorcolor <c> <c> <c> <BUFFER> [a]`
`berrorcolor <COLOR>`

Defines the color of error bars. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With `a` the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`dirarrows <bool> <BUFFER>`

Toggle direction arrows. If set the X error value will be drawn as direction arrow (0-360 degree)

`dirarrowsize <size> <BUFFER>`

Defines the size of direction arrow.

`dirarrowlength <length> <BUFFER>`

Defines the width of direction arrow.

`dirarrowtype <type> <BUFFER>`

Defines the direction arrow type (0-15).

`blegend <bool> <BUFFER>`

Toggle automatic legend plotting for buffers.

`bfreex <bool> <BUFFER>`

If set for a buffer, the buffer does not depend to any X axis. Instead the display range can be set with the `bfreexrange` command.

`bfreey <bool> <BUFFER>`

If set for a buffer, the buffer does not depend to any Y axis. Instead the display range can be set with the `bfreeyrange` command.

`bfreexrange <min> <max> <BUFFER>`

Defines the X range for buffers which not belong to an X axis.

`bfreeyrange <min> <max> <BUFFER>`

Defines the Y range for buffers which not belong to an Y axis.

`barytop <bool> <BUFFER>`

If set Y bars will be drawn from the top of the frame.

`barybottom <bool> <BUFFER>`

If set Y bars will be drawn from the bottom of the frame.

`barxleft <bool> <BUFFER>`

If set X bars will be drawn from the left of the frame.

`barxright <bool> <BUFFER>`

If set X bars will be drawn from the right of the frame.

# Macro Language: Axis Style Commands

`setaxis <x axis 1> <y axis 1> <x axis 2> <y axis 2>`

Enable or disable axis drawing (possible values: yes/no)

`ascalstart <AXIS> <start>`

Defines where axis scaling should start.

`ascalend <AXIS> <end>`

Defines where axis scaling should end.

`asetreverse <AXIS> <bool>`

If set the axis will be reverse plotted (possible values: yes/no)

`atickdist <AXIS> <dist>`

Defines the distance between two major ticks. If your axis is a time axis you have to enter `days:hours:minutes:seconds` or `w` (1 week) or `m` (1 month) or `y` (1 year).

`aminsteps <AXIS> <steps>`

Defines the number of minor ticks between two major ticks.

`atimeformat <AXIS> <format>`

Defines the format used for the displaying time values on time axis (time format tokens).

`atrigger <AXIS> <trigger>`

This allows to define a trigger, a number where a tick should appear and all other ticks should depend on.

`ascalexpr <AXIS> <expr>`

This allows scaling of axis numbers without changing the data itself. For example, to display seconds instead of milliseconds enter `v/1000` in this field. v is the variable which represents the axis number.

`aexpoffset <AXIS> <offset>`

Allows you to define the limit, above which numbers are plotted in exponential notation. The number you define is the exponent of the limit.

`adecplaces <AXIS> <n>`

Defines the number of decimal places for axis numbers.

`adecplacesauto <AXIS> <bool>`

If enabled the number of decimal places for axis numbers will be determined automatically (possible values: yes/no).

`aformat <AXIS> <format>`

Defines the axis format (0=linear, 1=logarithmic, 2=time).

`asetsmalllogzero <AXIS> <bool>`

If enabled the smallest value on a logarithmic axis will be replaced with 0 (even if this is not correct) (possible values: yes/no).

`atext <AXIS> <text>`

Defines the axis text label.

`anumfont <AXIS> <font> <size>`

Defines the font for axis numbers.

`anumoffset <AXIS> <offset>`

The distance between numbers and frame.

`anumalign <AXIS> <align>`

Defines the alignment of axis numbers.
`<align>`: The text box alignment.

`anumangle <AXIS> <angle>`

Defines the angle for axis numbers.

`atextfont <AXIS> <font> <size>`

Defines the font for axis text labels.

`atextoffset <AXIS> <offset>`

The distance between text label and frame.

`atextoffsetwindow <AXIS> <bool>`

If defined the axis text offset is the distance from the window frame.

`asetnum <AXIS> <bool>`

Enable or disable axis numbers (possible values: yes/no).

`asettext <AXIS> <bool>`

Enable or disable axis text labels (possible values: yes/no).

`asetfliptext <AXIS> <bool>`

Enable or disable flipped axis text labels (possible values: yes/no).

`atextcolor <AXIS> <c> <c> <c> [a]`
`atextcolor <AXIS> <COLOR>`

Defines the color for axis numbers and text. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With a the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`asetzeroline <AXIS> <bool>`

Enable or disable a line at the value zero (possible values: yes/no).

`azerolinecolor <AXIS> <c> <c> <c> [a]`
`azerolinecolor <AXIS> <COLOR>`

Defines the color for zero lines. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With a the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`aticklength <AXIS> <length>`

Defines the tick length.

`aminticklength <AXIS> <length>`

Defines the minor tick length.

`atickwidth <AXIS> <width>`

Defines the tick width.

`amintickwidth <AXIS> <width>`

Defines the minor tick width.

`asetticks <AXIS> <bool>`

Enable or disable axis ticks (possible values: yes/no).

`asetminticks <AXIS> <bool>`

Enable or disable axis minor ticks (possible values: yes/no).

`asetticksbothsides <AXIS> <bool>`

Enable or disable axis ticks on both sides of the frame (possible values: yes/no).

`asetminticksbothsides <AXIS> <bool>`

Enable or disable axis minor ticks on both sides of the frame (possible values: yes/no).

`atickcolor <AXIS> <c> <c> <c> [a]`
`atickcolor <AXIS> <COLOR>`

Defines the tick color. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With a the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`amintickcolor <AXIS> <c> <c> <c> [a]`
`amintickcolor <AXIS> <COLOR>`

Defines the minor tick color. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With a the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`atickstyle <AXIS> <style>`

Defines the tick style (0=inside, 1=outside, 2=both)

`asetgrid <AXIS> <bool>`

Enable or disable the grid (possible values: yes/no).

`asetmingrid <AXIS> <bool>`

Enable or disable the minor grid (possible values: yes/no).

`agridcolor <AXIS> <c> <c> <c> [a]`
`agridcolor <AXIS> <COLOR>`

Defines the grid color. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With a the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`amingridcolor <AXIS> <c> <c> <c> [a]`
`amingridcolor <AXIS> <COLOR>`

Defines the minor grid color. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With a the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`agridwidth <AXIS> <width>`

Defines the grid width.

`amingridwidth <AXIS> <width>`

Defines the minor grid width.

`agridpattern <AXIS> <pattern>`

Defines the grid dash pattern (0-15).

`amingridpattern <AXIS> <pattern>`

Defines the minor grid pattern (0-15).

`agridfront <AXIS> <bool>`

Defines if the grid should be drawn in front or not (possible values: yes/no).

`amingridfront <AXIS> <bool>`

Defines if the minor grid should be drawn in front or not (possible values: yes/no).

`alabel <AXIS> <number> <replacement>`

Defines an axis number replacement

`aclearlabels <AXIS>`

Delete all axis number replacement

# Macro Language: Legend Commands

`setlegend <bool>`

Enable or disable the legend (possible values: yes/no).

`legendpos <x> <y>`

Defines the legend position.

`setlegendbg <bool>`

Enable or disable legend background (possible values: yes/no).

`setlegendhorizontal <bool>`

If set draw legend entries horizontal.

`legendalign <align>`

Defines the alignment of the legend box

`legendlength <length>`

Defines the length of legend lines.

`legendspace <space>`

Defines the vertical space between two legend entries.

`legendcolor <c> <c> <c> [a]`
`legendcolor <COLOR>`

Defines the color for the legend text. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With a the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`legendbgcolor <c> <c> <c> [a]`
`legendbgcolor <COLOR>`

Defines the legend background color. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With a the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.

`legendfont <font> <font size>`

Defines the legend font.

# Macro Language: Text & Graphic Commands

`text <tag> <x> <y> <font> <font size> <text> [c] [c] [c] [angle] [align] [pos] [offset] [cb] [cb] [cb]`

Adds a text label to the document.
`<tag>`: The `tag` argument should be an integer value which can be used later to address a graphic or text object. Interactively created text or graphic objects always have the tag 0.
`<x>`, `<y>`: the position in screen coordinates of the text.
`<font>`: The font for the text (e.g. Helvetica-Bold)
`<font size>`: The font size of the text.
`[c] [c] [c]`: The color of the text. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB).
`[angle]`: The text angle.
`[align]`: The text alignment (0=left, 1=center, 2=right).
`[pos]`: The position for automatically positioned text label (0=off, 1-21 fixed text positions).
`[offset]`: Offset for automatically positioned text label.
`[cb] [cb] [cb]`: The color of the text background. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB).

`ftext <tag> <COOR> <x> <y> <font> <font size> <text> [c] [c] [c] [angle] [align] [tbalign] [cb] [cb] [cb]`

Adds a floating text label to the document.
`<tag>`: The `tag` argument should be an integer value which can be used later to address a graphic or text object. Interactively created text or graphic objects always have the tag 0.
`<COOR>`: The coordinate system to which the rectangle belongs.
`<x>`, `<y>`: the position of the text in the defined coordinate system.
`<font>`: The font for the text (e.g. Helvetica-Bold)
`<font size>`: The font size of the text.
`[c] [c] [c]`: The color of the text. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB).
`[angle]`: The text angle.
`[align]`: The text alignment (0=left, 1=center, 2=right).
`[tbalign]` : The text box alignment.
`[pos]`: The position for automatically positioned text label (0=off, 1-21 fixed text positions).
`[offset]`: Offset for automatically positioned text label.
`[cb] [cb] [cb]`: The color of the text background. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB).

`qtext <COOR> <x> <y> <text> [angle] [align] [tbalign] [COLOR]`

Adds a text label to the document. This command uses the default color and the default font. The generated text label has the tag 999.
`<COOR>`: The coordinate system to which the rectangle belongs.
`<x>`, `<y>`: the position in screen coordinates of the text.
`[angle]`: The text angle.
`[align]`: The text alignment (0=left, 1=center, 2=right).
`[tbalign]`: The text box alignment.
`[COLOR]`: The text color as hexadecimal string.

`ptext <text> <pos> [angle] [offset] [COLOR]`

Adds an auto positioning text label to the document. This command uses the default color and the default font. The generated text label has the tag 998.
`[pos]`: The position for automatically positioned text label (valid values are 1-21).
`[angle]`: The text angle (can be 0, 90, 180 or 270).
`[offset]`: Offset for automatically positioned text label.
`[COLOR]`: The text color as hexadecimal string.

`rect <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [c] [c] [c]`
`rect <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [COLOR]`

Draw a rectangle with the given attributes.
`<tag>`: The `tag` argument should be an integer value which can be used later to address a graphic or text object. Interactively created text or graphic objects always have the tag 0.
`<COOR>`: The coordinate system to which the rectangle belongs.
`<x>`, `<y>`: The position of the rectangle in the defined coordinate system.
`<w>`, `<h>`: The size of the rectangle in the defined coordinate system.
`[linewidth]`: The rectangles line width.
`[dash]`: The dash pattern for the rectangle (0-15).
`[c] [c] [c]`: The color of the rectangle. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB). Alternative you can specify the color as hexadecimal string.

`frect <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [c] [c] [c] [cf] [cf] [cf]`
`frect <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [COLOR] [COLOR]`

Draw a filled rectangle with the given attributes.
`<tag>`: The `tag` argument should be an integer value which can be used later to address a graphic or text object. Interactively created text or graphic objects always have the tag 0.
`<COOR>`: The coordinate system to which the rectangle belongs.
`<x>`, `<y>`: The position of the rectangle in the defined coordinate system.
`<w>`, `<h>`: The size of the rectangle in the defined coordinate system.
`[linewidth]`: The rectangles line width.
`[dash]`: The dash pattern for the rectangle (0-15).
`[c] [c] [c]`: The color of the rectangle. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB). Alternative you can specify the color as hexadecimal string.
`[cf] [cf] [cf]`: The fill color of the rectangle. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB). Alternative you can specify the color as hexadecimal string.

`circle <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [c] [c] [c]`
`circle <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [COLOR]`

Draw a circle with the given attributes.
`<tag>`: The `tag` argument should be an integer value which can be used later to address a graphic or text object. Interactively created text or graphic objects always have the tag 0.
`<COOR>`: The coordinate system to which the circle belongs.
`<x>`, `<y>`: The position of the circle in the defined coordinate system.
`<w>`, `<h>`: The size of the circle of the defined coordinate system.
`[linewidth]`: The circles line width.
`[dash]`: The dash pattern for the circle (0-15).
`[c] [c] [c]`: The color of the circle. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB). Alternative you can specify the color as hexadecimal string.

`fcircle <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [c] [c] [c] [cf] [cf] [cf]`
`fcircle <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [COLOR] [COLOR]`

Draw a filled circle with the given attributes.
`<tag>`: The `tag` argument should be an integer value which can be used later to address a graphic or text object. Interactively created text or graphic objects always have the tag 0.
`<COOR>`: The coordinate system to which the circle belongs.
`<x>`, `<y>`: The position of the circle in the defined coordinate system.
`<w>`, `<h>`: The size of the circle of the defined coordinate system.
`[linewidth]`: The circles line width.
`[dash]`: The dash pattern for the circle (0-15).
`[c] [c] [c]`: The color of the circle. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB). Alternative you can specify the color as hexadecimal string.
`[cf] [cf] [cf]`: The fill color of the circle. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB). Alternative you can specify the color as hexadecimal string.

`arrow <tag> <COOR> <x1> <y1> <x2> <y2> <a1> <a2> <at> <as> [linewidth] [dash] [c] [c] [c]`
`arrow <tag> <COOR> <x1> <y1> <x2> <y2> <a1> <a2> <at> <as> [linewidth] [dash] [COLOR]`

Draw an arrow with the given attributes.
`<tag>`: The `tag` argument should be an integer value which can be used later to address a graphic or text object. Interactively created text or graphic objects always have the tag 0.
`<COOR>`: The coordinate system to which the arrow belongs.
`<x1>`, `<y1>`, `<x2>`, `<y2>`: The start and end position of the arrow in the defined coordinate system.
`<a1>`, `<a2>`: Draw arrow at line start and/or end (possible values: yes/no)
`<at>`: The arrow type (0=open, 1=closed, 2=triangle, 3=double).
`<as>`: The arrow size.
`[linewidth]`: The arrow line width.
`[dash]`: The dash pattern for the arrow (0-15).
`[c] [c] [c]`: The color of the arrow. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB). Alternative you can specify the color as hexadecimal string.

`line <tag> <COOR> <x1> <y1> <x2> <y2> [linewidth] [dash] [c] [c] [c]`
`line <tag> <COOR> <x1> <y1> <x2> <y2> [linewidth] [dash] [COLOR]`

Draw a line with the given attributes.
`<tag>`: The `tag` argument should be an integer value which can be used later to address a graphic or text object. Interactively created text or graphic objects always have the tag 0.
`<COOR>`: The coordinate system to which the line belongs.
`<x1>`, `<y1>`, `<x2>`, `<y2>`: The start and end position of the line in the defined coordinate system.
`[linewidth]`: The line width.
`[dash]`: The dash pattern for the line (0-15).
`[c] [c] [c]`: The color of the line. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB). Alternative you can specify the color as hexadecimal string.

`bgraphic [tag]`

By default graphic objects will be placed in the foreground of the document. With this command you can send graphic objects to the background.

`rmtext [tag]`

Remove text objects with a given tag or all text objects.

`rmgraphic [tag]`

Remove graphic objects with a given tag or all graphic objects.

`defaultfont <font> <font size>`

Defines a default font for all text and graphic commands.

`defaultcolor <c> <c> <c>`
`defaultcolor <COLOR>`

Defines a default color for all text and graphic commands.
`<c> <c> <c>`: The color of the circle. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command `colormode` (0=RGB, 1=HSB). Alternative you can specify the color as hexadecimal string.

# Macro Language: Document Commands

`new`

Opens a new document.

`close`

Close the current document window.

`open <filename>`

Opens the document with the given filename.

`save`

Save the current document.

`saveas <filename>`

Save document to a new file.

`savepng <filename> [resolution]`

Save document as a PNG file. Resolution can be 0 (low), 1 (normal, default) or 2 (high).

`savejpg <filename> [resolution]`

Save document as JPG file. Resolution can be 0 (low), 1 (normal, default) or 2 (high).

`savepdf <filename>`

Save document as PDF file.

`saveeps <filename>`

Save document as EPS file.

`printdoc`

Print the current document.

`export <filename> <mode> <BUFFER>`

Export ASCII data to file.
`<filename>`: Export data to this file.
`<mode>`: Export mode (0=all columns, 1=X,Y,ErrorY, 2=X,Y,ErrorX, 3=X, 4=Y).
`<BUFFER>`: Exported data buffer (Only one data buffer can be exported).

`import <filename> <mode> [separator] [xcol] [noxcol] [comment] [ignore] [comment sequence] [only number lines] [time format] [comma separator] [period separator] [timezone] [white spaces]`

Import an ASCII file
`<mode>`: Import mode (0=multicolumn, 1=error values).
`[separator]`: Defines the field separator for ASCII import.
`[xcol]`: Defines the X column starting with 1 as the first column.
`[noxcol]`: If true all columns will be interpreted as Y values and the X values will be generated as sequence number.
`[comment]`: Overwrites the default comment for the imported buffers.
`[ignore]`: Lines containing this string will be ignored.
`[comment sequence]`: Anything in a line behind this sequence will be ignored for import.
`[only number lines]`: If true import ignores all lines which not begin with a number.
`[no time]`: If true don't try to import time values
`[time format]`: custom time format for x column import.
`[comma separator]`: If true treat comma as field separator
`[period separator]`: If true treat period as field separator.
`[timezone]`: set the timezone for time values.
`[white spaces]`: If true import ignores leading white spaces in lines.

Example:

      import $file \       # filename
           0 \             # mode
           '' \            # separator
           1 \             # x col
           NO \            # no x col
           'comment' \     # comment
           '' \            # ignore
           '' \            # comment sequence
           YES \           # only num lines
           NO \            # notime
           'yyyy-MM-dd' \  # time format
           NO \            # comma separator
           NO \            # period separator
           '' \            # time zone
           NO              # whitespace

`binaryimport <filename> <type> <mode> <swap> <columns> [comment]`

Performs a binary import of data.
`<type>`: Defines the data type (0=double (64bit), 1=float (32bit), 2=integer (32 bit), 3=integer (16 bit)).
`<mode>`: Defines the import mode (0=column mode, 1=block mode).
`<swap>`: Enables or disables byte order swapping.
`<columns>`: The number of columns to import.

`mysqlimport <host> <db> <user> <password> <port> <sql>`

Import data from MySQL database.

`perlimport <filename> [name]`

This executes a Perl import filter for the given file. Look in the perl import section for detailed information.
If no `name` is given the inline Perl block will be used. This is a block in your macro starting with a line containing `PERL` and ending with a line containing `PERL`. The default timeout for Perl scripts is 10 seconds. After this time the Perl job will be killed to prevent never come back jobs. You can set the timeout individual with the `perltimout <sec>` macro command.

`perlfilter <BUFFER> [name]`

This executes a Perl filter for the given buffers. Look in the perl filter section for detailed informations.
If no `name` is given the inline Perl block will be used. This is a block in your macro starting with a line containing `PERL` and ending with a line containing `PERL`. The default timeout for Perl scripts is 10 seconds. After this time the Perl job will be killed to prevent never come back jobs. You can set the timeout individual with the `perltimout <sec>` macro command

`subview <width> <height> <x> <y>`

Add a subview to the document.

`sizeview <width> <height> <x> <y>`

Change the size and position of the current subview

`changeview <subview number>`

Change the current view where 0 ist the main view.

`deleteview <subview number | all>`

Delete one or all subviews

# Macro Language: Miscellaneous Commands

`colormode <mode>`

With this command you can define if colors will be defined as RGB or HSB (0=RGB, 1=HSB).

`list`

List all data buffer on console

`exit`

Stop macro.

`clr`

Clears the console output.

`setvar <var> <expr>`
`<var>=<expr>`

Defines a variable.

`setstring <var> <value>`
`$<var>=<expr>`

Defines a string variable.

`eval <name> <expr>`

Evaluates the expression and defines the result as a string variable.

`format <name> <format> <expr> ... <expr>`

Returns a string created with the given format string. The format can be defined in the usual `printf` notation.

`forecast <lon> <lat> [field]`

Returns a complete set of weather forecast data (10 days) and weather history (14 days). If field is not given all 12 data sets will be loaded. To get a specific data set add one of the following codes:

0 | temperature (°C) | 6 | cloud cover
1 | surface temperature (°C) | 7 | wind direction
2 | dew point (°C) | 8 | wind speed
3 | humidity (%) | 9 | wind gusts (m/s)
4 | pressure (hPa) | 10 | CAPE (J/Kg)
5 | rain (mm) | 11 | KP index

# FAQ

What are the system requirements for Plot2
Plot2 will run on Mac OS X 10.9 but I recommend at least 10.10

Is it possible to have transparent backgroud?
Yes, go to the General Inspector and uncheck Draw Backgroud and Draw Margins.

Is it possible to have subscript, superscript, greek letters, etc. in the axis labels?
Yes & No. This is not possible with the Axis Text field from the Axis Inspector. Instead you can use a text object with enabled auto positioning
(Example: http://plot.micw.eu/downloads/supersubscript.zip)

Is it possible to import my very special data format?
If the builtin import function is not able to read your data you can build tour own Perl based import module. Click here for details.

Will there be Plot versions for Windows or Linux?
No.

I have a problem changing comment entries in the inspector
Single click on a line in the inspector to make it selected, a second single click on the comment will make it editable

Where is the curve fitting?
I’m sorry, but the curve fitting module has gone. This part of the Plot sources is not under my control, and I’m no longer able to support this within acceptable amount of time.

# Macro Reference

## Range Commands

`range <AXIS> <min> <max>` `rescale [AXISGROUP]`
`upscale <AXISGROUP> [factor]`
`downscale <AXISGROUP> [factor]`

## Range Commands

`range <AXIS> <min> <max>`
`rescale [AXISGROUP]`
`upscale <AXISGROUP> [factor]`
`downscale <AXISGROUP> [factor]`

## Buffer Commands

`select <BUFFER>`
`setcurrent <number>`
`invertselection`
`hide <BUFFER>`
`show <BUFFER>`
`delete <BUFFER>`
`duplicate <BUFFER>`
`setcomment <BUFFER> <text>`
`addcomment <BUFFER> <text>`
`getcomment <buffer> $<var>`
`setsource <BUFFER> <text>`
`addsource <BUFFER> <text>`
`getsource <buffer> $<var>`
`belongx <BUFFER> <axis>`
`belongy <BUFFER> <axis>`
`addvalue <buffer> <x value> <y value> <x error> <y error>`
`setxvalue <buffer> <index> <value>`
`setxerror <buffer> <index> <value>`
`setyvalue <buffer> <index> <value>`
`setyerror <buffer> <index> <value>`
`rmvalue <buffer> <index>`
`newbuffer`
`moveup <BUFFER>`
`movedown <BUFFER>`

## Control Commands

`if <expr> <operator> <expr>`
`else`
`endif`
`loop <RANGE>`
`bufferloop <BUFFER>`
`dataloop <buffer>`
`endloop`
`timer <interval> [count]`
`stoptimer`
`perltimeout <seconds>`

## Interactive Commands

`ask <text>`
`askoption <text> <button1> <button0>`
`browse`
`input [text]`
`print <argument> ...`
`sleep <seconds>`
`setwarn <BOOL>`

## Calculation Commands

`fg <axis> <min> <max> <steps> <expr>`
`bcalc <buffer1> <operator> <buffer2>`
`calc <data> <expr> <BUFFER>`
`swapxy <BUFFER>`
`sortx <BUFFER>` `sorty <BUFFER>` `normx <ref1> <ref2> <new1> <new2> <BUFFER>`
`normy <ref1> <ref2> <new1> <new2> <BUFFER>`
`movex <from> <to> <BUFFER>`
`movey <from> <to> <BUFFER>`
`cutoutsidex <min> <max> <BUFFER>`
`cutinsidex <min> <max> <BUFFER>`
`cutoutsidey <min> <max> <BUFFER>`
`cutinsidey <min> <max> <BUFFER>`
`calcint <min> <max> <BUFFER>`
`linreg <min> <max> <BUFFER>`
`logreg <min> <max> <BUFFER>`
`expreg <min> <max> <BUFFER>`
`linbg <a> <b> <BUFFER>`
`smooth <factor> <BUFFER>`
`fftsmooth <factor> <BUFFER>`
`datareduction <n> <BUFFER>`
`spline <points> <strength> <BUFFER>`
`fft <windowing> <BUFFER>`
`diff <interval> <BUFFER>`
`integrate <BUFFER>`
`setxval <BUFFER> <index> <value>`
`setyval <BUFFER> <index> <value>`
`setxeval <BUFFER> <index> <value>`
`setyeval <BUFFER> <index> <value>`

## Style Commands

`margins <left> <right> <bottom> <top>`
`windowsize <width> <height>`
`drawbg <bool>`
`drawmargin <bool>`
`drawframe <bool>`
`bgcolor <c> <c> <c> [a]`
`bgcolor <COLOR>`
`margincolor <c> <c> <c> [a]`
`margincolor <COLOR>`
`framecolor <c> <c> <c> [a]`
`framecolor <COLOR>`
`framewidth <width>`
`framestyle <style>`
`forceframe <bool>`
`framearrows <bool>`
`crossarrows <type>`
`framearrowsize <size>`
`framearrowtype <type>`

## Data Style Commands

`bstyle <lines> <symblos> <fill> <ybars> <xbar> <ystick> <xstick> <dots> <hist> <fhist> <BUFFER>`

`bstyleclear <BUFFER>`
`bstylelines <bool> <BUFFER>`
`bstylesymbols <bool> <BUFFER>`
`bstylefill <bool> <BUFFER>`
`bstyleybars <bool> <BUFFER>`
`bstylexbars <bool> <BUFFER>`
`bstyleysticks <bool> <BUFFER>`
`bstylexsticks <bool> <BUFFER>`
`bstyledots <bool> <BUFFER>`
`bstylehist <bool> <BUFFER>`
`bstylefhist <bool> <BUFFER>`
`bcolor <c> <c> <c> <BUFFER> [a]`
`bcolor <COLOR> <BUFFER>`
`bfillcolor <c> <c> <c> <BUFFER> [a]`
`bfillcolor <COLOR> <BUFFER>`
`bbarcolor <c> <c> <c> <BUFFER> [a]`
`bbarcolor <COLOR>`
`bstickcolor <c> <c> <c> <BUFFER> [a]`
`bstickcolor <COLOR> <BUFFER>`
`blinewidth <linewidth> <BUFFER>`
`blinepattern <pattern> <BUFFER>`
`bpatternwidth <patternwidth> <BUFFER>`
`bsymbol <symbol> <BUFFER>`
`bsymbolsize <symbolsize> <BUFFER>`
`bsymbolfill <bool> <BUFFER>`
`bsticksize <sticksize> <BUFFER>`
`bsticksabs <bool> <BUFFER>`
`bdynsize <BUFFER> [expr]`
`bxerrorval <error> <BUFFER>`
`bxerror <type> <BUFFER>`
`byerrorval <error> <BUFFER>`
`byerror <type> <BUFFER>`
`berrorlinewidth <linewidth> <BUFFER>`
`berrorcolor <c> <c> <c> <BUFFER> [a]`
`berrorcolor <COLOR>`
`dirarrows <bool> <BUFFER>`
`dirarrowsize <size> <BUFFER>`
`dirarrowlength <length> <BUFFER>`
`dirarrowtype <type> <BUFFER>`
`blegend <bool> <BUFFER>`
`bfreex <bool> <BUFFER>`
`bfreey <bool> <BUFFER>`
`bfreexrange <min> <max> <BUFFER>`
`bfreeyrange <min> <max> <BUFFER>`
`barytop <bool> <BUFFER>`
`barybottom <bool> <BUFFER>`
`barxleft <bool> <BUFFER>`
`barxright <bool> <BUFFER>`

## Axis Style Commands

`setaxis <x axis 1> <y axis 1> <x axis 2> <y axis 2>`
`ascalstart <AXIS> <start>`
`ascalend <AXIS> <end>`
`asetreverse <AXIS> <bool>`
`atickdist <AXIS> <dist>`
`aminsteps <AXIS> <steps>`
`atimeformat <AXIS> <format>`
`atrigger <AXIS> <trigger>`
`ascalexpr <AXIS> <expr>`
`aexpoffset <AXIS> <offset>`
`adecplaces <AXIS> <n>`
`adecplacesauto <AXIS> <bool>`
`aformat <AXIS> <format>`
`asetsmalllogzero <AXIS> <bool>`
`atext <AXIS> <text>`
`anumfont <AXIS> <font> <size>`
`anumoffset <AXIS> <offset>`
`anumalign <AXIS> <align>`
`anumangle <AXIS> <angle>`
`atextfont <AXIS> <font> <size>`
`atextoffset <AXIS> <offset>`
`atextoffsetwindow <AXIS> <bool>`
`asetnum <AXIS> <bool>`
`asettext <AXIS> <bool>`
`asetfliptext <AXIS> <bool>`
`atextcolor <AXIS> <c> <c> <c> [a]`
`atextcolor <AXIS> <COLOR>`
`asetzeroline <AXIS> <bool>`
`azerolinecolor <AXIS> <c> <c> <c> [a]`
`azerolinecolor <AXIS> <COLOR>`
`aticklength <AXIS> <length>`
`aminticklength <AXIS> <length>`
`atickwidth <AXIS> <width>`
`amintickwidth <AXIS> <width>`
`asetticks <AXIS> <bool>`
`asetminticks <AXIS> <bool>`
`asetticksbothsides <AXIS> <bool>`
`asetminticksbothsides <AXIS> <bool>`
`atickcolor <AXIS> <c> <c> <c> [a]`
`atickcolor <AXIS> <COLOR>`
`amintickcolor <AXIS> <c> <c> <c> [a]`
`amintickcolor <AXIS> <COLOR>`
`atickstyle <AXIS> <style>`
`asetgrid <AXIS> <bool>`
`asetmingrid <AXIS> <bool>`
`agridcolor <AXIS> <c> <c> <c> [a]`
`agridcolor <AXIS> <COLOR>`
`amingridcolor <AXIS> <c> <c> <c> [a]`
`amingridcolor <AXIS> <COLOR>`
`agridwidth <AXIS> <width>`
`amingridwidth <AXIS> <width>`
`agridpattern <AXIS> <pattern>`
`amingridpattern <AXIS> <pattern>`
`agridfront <AXIS> <bool>`
`amingridfront <AXIS> <bool>`
`alabel <AXIS> <number> <replacement>`
`aclearlabels <AXIS>`

## Legend Commands

`setlegend <bool>`
`legendpos <x> <y>`
`setlegendbg <bool>`
`setlegendhorizontal <bool>`
`legendalign <align>`
`legendlength <length>`
`legendspace <space>`
`legendcolor <c> <c> <c> [a]`
`legendcolor <COLOR>`
`legendbgcolor <c> <c> <c> [a]`
`legendbgcolor <COLOR>`
`legendfont <font> <font size>`

## Text & Graphic Commands

`text <tag> <x> <y> <font> <font size> <text> [c] [c] [c] [angle] [align] [pos] [offset] [cb] [cb] [cb]`
`ftext <tag> <COOR> <x> <y> <font> <font size> <text> [c] [c] [c] [angle] [align] [tbalign] [cb] [cb] [cb]`
`qtext <COOR> <x> <y> <text> [angle] [align] [tbalign] [COLOR]`
`rect <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [c] [c] [c]`
`rect <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [COLOR]`
`frect <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [c] [c] [c] [cf] [cf] [cf]`
`frect <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [COLOR] [COLOR]`
`circle <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [c] [c] [c]`
`circle <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [COLOR]`
`fcircle <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [c] [c] [c] [cf] [cf] [cf]`
`fcircle <tag> <COOR> <x> <y> <w> <h> [linewidth] [dash] [COLOR] [COLOR]`
`arrow <tag> <COOR> <x1> <y1> <x2> <y2> <a1> <a2> <at> <as> [linewidth] [dash] [c] [c] [c]`
`arrow <tag> <COOR> <x1> <y1> <x2> <y2> <a1> <a2> <at> <as> [linewidth] [dash] [COLOR]`
`line <tag> <COOR> <x1> <y1> <x2> <y2> [linewidth] [dash] [c] [c] [c]`
`line <tag> <COOR> <x1> <y1> <x2> <y2> [linewidth] [dash] [COLOR]`

`bgraphic [tag]`
`rmtext [tag]`
`rmgraphic [tag]`
`defaultfont <font> <font size>`
`defaultcolor <c> <c> <c>`
`defaultcolor <COLOR>`

## Document Commands

`new`
`close`
`open <filename>`
`save`
`saveas <filename>`
`savepng <filename> [resolution]`
`savejpg <filename> [resolution]`
`savepdf <filename>`
`saveeps <filename>`
`printdoc`
`export <filename> <mode> <BUFFER>`

`import <filename> <mode> [separator] [xcol] [noxcol] [comment] [ignore] [comment sequence] [only number lines] [time format] [comma separator] [period separator] [timezone] [white spaces]`
`binaryimport <filename> <type> <mode> <swap> <columns> [comment]`
`mysqlimport <host> <db> <user> <password> <port> <sql>`

`perlimport <filename> [name]`
`perlfilter <BUFFER> [name]`
`subview <width> <height> <x> <y>`
`sizeview <width> <height> <x> <y>`
`changeview <subview number>`
`deleteview <subview number | all>`

## Miscellaneous Commands

`colormode <mode>`
`list`
`exit`
`clr`
`setvar <var> <expr>`
`<var>=<expr>`
`setstring <var> <value>`
`$<var>=<expr>`
`eval <name> <expr>`
`format <name> <format> <expr> ... <expr>`
`forecast <lon> <lat> [field]`

Michael Wesemann
Berlin, Germany
plot@micw.org

Because the program is licensed free of charge, there is no warranty for the program, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide the program "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. Should the program prove defective, you assume the cost of all necessary servicing, repair or correction.

In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute the program as permitted above, be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if such holder or other party has been advised of the possibility of such damages.

Da das Programm ohne jegliche Kosten lizenziert wird, besteht keinerlei Gewährleistung für das Programm, soweit dies gesetzlich zulässig ist. Sofern nicht anderweitig schriftlich bestätigt, stellen die Copyright-Inhaber und/oder Dritte das Programm so zur Verfügung, „wie es ist“, ohne irgendeine Gewährleistung, weder ausdrücklich noch implizit, einschließlich – aber nicht begrenzt auf – Marktreife oder Verwendbarkeit für einen bestimmten Zweck. Das volle Risiko bezüglich Qualität und Leistungsfähigkeit des Programms liegt bei Ihnen. Sollte sich das Programm als fehlerhaft herausstellen, liegen die Kosten für notwendigen Service, Reparatur oder Korrektur bei Ihnen.

In keinem Fall, außer wenn durch geltendes Recht gefordert oder schriftlich zugesichert, ist irgendein Copyright-Inhaber oder irgendein Dritter, der das Programm wie oben erlaubt modifiziert oder verbreitet hat, Ihnen gegenüber für irgendwelche Schäden haftbar, einschließlich jeglicher allgemeiner oder spezieller Schäden, Schäden durch Seiteneffekte (Nebenwirkungen) oder Folgeschäden, die aus der Benutzung des Programms oder der Unbenutzbarkeit des Programms folgen (einschließlich – aber nicht beschränkt auf – Datenverluste, fehlerhafte Verarbeitung von Daten, Verluste, die von Ihnen oder anderen getragen werden müssen, oder dem Unvermögen des Programms, mit irgendeinem anderen Programm zusammenzuarbeiten), selbst wenn ein Copyright-Inhaber oder Dritter über die Möglichkeit solcher Schäden unterrichtet worden war.