ArrayPlotter

Parent Previous Next

Full Library / Result / Plotter / ArrayPlotter

Block Name: ArrayPlotter

Code File Location: VisualSim/actor/lib/gui/ArrayPlotter
public class ArrayPlotter
extends SavingPlotter
implements SequenceActor

Description

This block plots the incoming data on the Y-Axis against the current simulation time on the X-axis. Every wire connected to this block input is considered a separate dataset and plotted separately. The block can display the plot during the simulation and/or save to file. The file name to save is entered in the block parameters.  The order of each dataset is the wire number that can be viewed by a mouse-over on the respective wire.

The block behavior is controlled as follows:

A plotter that plots a sequence of arrays of doubles. This plotter contains an instance of the Plot class from the VisualSim plot package as a public member. Data at the input, which can consist of any number of channels, are plotted on this instance. Each input channel is plotted as a separate data set. Each input token is an array of doubles.

The iterationsPerUpdate parameter can be used to fine tune the display. It can be quite expensive to generate the display, and by default, this actor generates it on every firing. If iterationsPerUpdate is set to some integer greater than one, then it specifies how many iterations should be executed between updates. Thus, if iterationsPerUpdate = 2, then every second time this actor fires, it will update the display. That is, it will update its         display on the first firing, the third, the fifth, etc. It will, however, consume its inputs on every firing. The plot is always updated in the wrapup() method.

    Note that this can be used to generate live plots, like SequenceScope, but it has fewer drawing artifacts than SequenceScope since it does not use XOR drawing mode.Also save the model before checking the savePlot     checkbox to ensure no error messages.

    To understand the usage of the plotter, view the ArrayPlotter Example in the BDE.

Parameter

Explanation

Type

Example

fillOnWrapup  This(Checkbox) determines whether to fill the plot when wrapup is invoked. - -
legend The legend is a comma-separated list of labels to attach to each dataset. The number of elements in this list should equal the number of input channels, although this is not enforced. String Read,Write
startingDataSet The index number of the first dataset to start the display. All datasets with number prior to this are not displayed. Integer 0
viewPlot If this option is enabled, the plot will be displayed during the simulation.  This must be disabled during batch mode. - -
savePlot If this option is enabled, then the plot will be saved to the File_Name. - -
fileName This block accepts a file name as a parameter. There are a number of file path options available for this block.  To see the list, view the section on File Paths in Reference Guide document here. The file name is a concatenation of any number of individual strings and parameters, separated by "+".  - -
iterationsPerUpdate The number of iterations between updates of the display on the screen. Its value must be non-negative. Integer
1
xUnit The increment of the X axis. Double
1.0
xInit The start point of the X axis. Double
0.0

Port

Explanation

Type

input This port can accept multiple dataset ( array of doubles ). Each dataset is associated with a unique color. The plot can accomodate up to 36 colors. Double


Created with the Personal Edition of HelpNDoc: Easily create Qt Help files