Plot data of up to three dimensions on a Window or UserView.
When the plotter window has focus, the following keyboard shortcuts can be used to change the display:
|+ / -||vertical zoom|
|=||compare plot channels|
|n||toggle normalize display (0..1) / (-1..1), or fit range|
|s||toggle superposition (see: superpose)|
|m||switch plot mode (see: Plotter: -plotMode)|
|e||toggle editing (see: Plotter: -editMode)|
|g||toggle horizontal (domain) grid|
|G||toggle vertical (codomain) grid|
|ctrl-+ / -||zoom font|
Plotter extends other classes with methods. To see what classes implements plot, see Methods: plot
Plot window title.
The window bounds (a Rect).
Either a Window / View may be passed in - then the plot is embedded. Otherwise a new Window is created.
Open given plotter in a new window or within a given composite view.
Either a Window or View may be passed in - then the plot is embedded. Otherwise a new Window is created.
The window bounds (a Rect).
Get/Set the style of data display. This can be an array of different modes for multi-channel data.
A Symbol or an Array of Symbols.
An Array of Symbols, unless there is only one mode specified or if all modes of a multi-channel plot are the same, in which case a Symbol is returned.
|connecting data points with linear interpolation|
|draw data points only|
|combination of lines and points|
|connecting data points with step interpolation|
|bar graph with filled bars|
Set properties of all plot views. Defaults are taken from
A list of symbol,value pairs. Supported properties:
If the edit mode is set to true, the data may be edited via cursor.
Set the minimum number of pixels between data points (default: 1)
If true (default:
true), specs are derived from new data (using min and max values) automatically.
If set to true, plotter displays channels on top of each other (keyboard shortcut: s)
Return or set the data values. Data may be numerical arrays of up to 3 dimensions.
Set the data values, with additional arguments determining how the plot is updated.
Arrays of data to plot. Data may be numerical arrays of up to 3 dimensions.
(Optional) The minimum value displayed on the y-axis.
(Optional) The maximum value displayed on the y-axis.
(Optional) A default range for the y-axis in the case that the max and min values of the data are identical.
Reference to the current internal data.
the last cursorPos (a Point).
the single subplots (a Plot).
Set or get the spec for the y-axis (codomain).
See also examples.
Set or get the spec for the x-axis (domain).
The default domainSpec when setting your Plotter -value is a linear spec in the range
[0, value.size-1]. Unless you set -domain, your values are displayed as evenly sampled between the
maxval of the domainSpecs.
If a new -value is set, you will need to update your domainSpecs.
Set or get the x-axis positions of your data points. The size of the
domainArray must equal the size of your value array, i.e. a domain value specified for each data point.
Domain values are mapped into the range of the -domainSpecs, so need not be evenly distributed. If -domain is set to
nil, your values are displayed as evenly sampled between the
maxval of the -domainSpecs.
Currently, for multichannel data plots, it's assumed that all channels of data share a single -domain. I.e.
domainArray must be an Array of rank 1.
If a new -value is set, you will need to update your -domain.
A more elaborate example can be found in the examples.
Set or get the colors of your data plot.
This can be an Array of Colors for multichannel data, or a single Color to map to all channels.
Supply a function which is evaluated when editing data. The function is called with the arguments:
The default styles are kept (and may be overridden) in
GUI.skin.at(\plot). See also GUI help.