Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Attribute Scope

Plot data from attribute of arriving entities

Library

SimEvents Sinks

Description

This block creates a plot using data from a real scalar-valued attribute of arriving entities. Use the Y attribute name parameter to specify which attribute to plot along the vertical axis.

Use the Enable entity OUT port option to choose whether the entity advances to a subsequent block or whether the block absorbs the arriving entity.

The Plot type parameter on the Plotting tab determines whether and how the block connects the points that it plots. For details, see Connections Among Points in Plots.

Selecting Data for the Horizontal Axis

Use the X value from parameter to select the type of data for the horizontal axis. The table below describes the choices.

Source of X DataDescription of Plot
Event timePlot of the specified attribute versus simulation time.
IndexPlot of the successive values of the specified attribute against a horizontal axis that represents the index of the values. The first entity's attribute value has an index of 1, the second entity's attribute value has an index of 2, and so on. For example, you might use this option when multiple entities might arrive simultaneously, to help determine the exact sequence among the simultaneous attribute values.

The figures below illustrate the different sources of data for the horizontal axis. The plots look similar, except that the second plot has uniform horizontal spacing rather than time-based spacing between successive points.

Ports

Entity Input Ports

LabelDescription
INPort for arriving entities, whose attributes contain the data to plot.

Entity Output Ports

LabelDescription
OUTPort for departing entities. You see this port only if you select Enable entity OUT port.

Signal Output Ports

LabelDescription
#aNumber of entities that have arrived at the block since the start of the simulation.

The initial output value is 0. This value is in effect from the start of the simulation until the first update by the block.

Dialog Box

To open the block dialog box, click the Parameters toolbar button in the plot window.

Plotting Tab

Plot type

The presentation format for the data. See Connections Among Points in Plots for details.

Y attribute name

Name of the attribute to plot along the vertical axis.

X value from

Source of data for the plot's horizontal axis. See Selecting Data for the Horizontal Axis for details.

Enable entity OUT port

Causes the block to have an entity output port labeled OUT, through which the arriving entity departs. If you clear this box, the block absorbs arriving entities.

Open scope at start of simulation

Selecting this option causes the plot window to open when you start the simulation. If you clear this box, you can open the plot window by double-clicking the block icon.

Axes Tab

Initial X axis lower limit, Initial X axis upper limit

The interval shown on the X axis at the beginning of the simulation. The interval might change from this initial setting due to zooming, autoscaling, or the If X value is beyond limit setting.

If X value is beyond limit

Determines how the plot changes if one or more X values are not within the limits shown on the X axis. For details, see Vary Axis Limits Automatically.

Initial Y axis lower limit, Initial Y axis upper limit

The interval shown on the Y axis at the beginning of the simulation. The interval might change from this initial setting due to zooming, autoscaling, or the If Y value is beyond limit setting.

If Y value is beyond limit

Determines how the plot changes if one or more attribute values are not within the limits shown on the Y axis. For details, see Vary Axis Limits Automatically.

Show grid

Toggles the grid on and off.

Figure Tab

Title

Text that appears as the title of the plot, above the axes.

Y label

Text that appears to the left of the vertical axis.

X label

Text that appears below the horizontal axis.

Position

A four-element vector of the form [left bottom width height] specifying the position of the scope window. (0,0) is the lower left corner of the display.

Show number of entities

Displays the number of plotted points using an annotation in the plot window.

Data History Tab

Store data when scope is closed

Select Unlimited to have the block cache all data for future viewing, Limited to cache a portion of the most recent data, and Disabled to avoid caching undisplayed data.

Limit data points to

The number of data points the block caches, using the most recent data. You see this field only if you set Store data when scope is closed to Limited.

Statistics Tab

These parameters determine whether the block produces data at signal output ports or omits those ports. For descriptions of the data and ports, see the preceding table, "Signal Output Ports".

Number of entities arrived

Allows you to use the signal output port labeled #a.

Was this topic helpful?