SWPlotterMonitor:
Filter:
SenseWorld/Classes (extension) | Plotting

SWPlotterMonitor
ExtensionExtension

makes a scrolling plot by evaluating a function regularly

Description

SWPlotterMonitor allows you to plot data as it comes in, so you can get an idea of the "shape" over time of the data.

Class Methods

.new

Create a new SWPlotterMonitor.

Arguments:

updater

The Function to evaluate to generate new data. This Function should either return a SimpleNumber, or an Array of numbers.

length

The amount of points to plot.

nc

The number of channels in the data - this should match what the updater function returns.

dt

The deltatime with which to evaluate the function.

skip

How often to plot, in multiples of dt. So if you set this to 5, the updater function will be evaluated 5 times at a time interval of dt, and then update the plot.

Returns:

an instance of SWPlotterMonitor

Instance Methods

.setRange

Sets the minimum and maximum value for the plot. See also the specs method of Plotter

Arguments:

min

minimum value for the spec

max

maximum value for the spec

.plotter

The intance of Plotter, into which is plotted.

.monitor

An instance of SWDataMonitor, which monitors the data of that is plotted.

.start

Starts the SWPlotterMonitor and makes the plot window if not open already.

.isPlaying

Boolean to indicate whether the SWPlotterMonitor is currently running.

.stop

Stop the SWPlotterMonitor

.cleanUp

Stop and close the SWPlotterMonitor.

Examples