Plots attribute lets you define the single or multiple data plots that appear on the trend chart. A trend chart plots histories of values. Each plot specifies where the values are stored. The history values may be stored in the history of a variable or a parameter, or locally in the trend chart. You create a plot for every data series you want to display. Every plot specifies a
value-axis, a point-format, and a connector-format. Plots can be similar in appearance and color or, by using different point- and connector-formats, each can have a unique look. The next diagram indicates two plots on a trend chart:
![]() |
plots choice from the trend chart menu
plots choice from the trend chart attribute table
![]() |
Plot subtables include three attributes that refer to other components, namely the
value-axis, point-format, and connector-format components.
Value-axis-name-or-number attribute table choice.
![]() |
Defining Where to Obtain History Values
The Use-local-history? attribute defines whether the plot is plotting local history values, stored within the trend chart, or external history values, stored within a variable or a parameter. yes (the default) directs G2 to maintain a history of values locally. G2 evaluates local history values from the plot expression in the plot's Expression attribute, regardless of whether that expression refers to a variable or parameter that itself maintains a history of values. no plots the history values of a variable or a parameter and implies that the plot expression must evaluate to a variable or a parameter, specifically, one that maintains history. If you set the use-local-history? attribute to no and the variable or parameter is not saving history values, the trend chart does not display anything for this plot.
Specifying the Value Axis for the Plot
The Value-axis-name-or-number attribute indicates the component reference name or number of the value axis for the current plot. The default number 1 indicates that the plot will use value axis #1, which is the default. referenced subtable from the attribute's table choice, or change the current reference to a new one by choosing change reference, shown next.
![]() |
Specifying the Point Format
The Point-format-name-or-number attribute specifies the component reference name or number of the point format for the current plot. The default number 1 indicates that the plot will use point-format #1, which is the default. referenced subtable, or change the current reference to a new one by choosing change reference. Specifying the Connector Format
The Connector-format-name-or-number attribute specifies the component reference name or number of the connector format this plot will use. The default number 1 indicates that the plot will use connector-format #1, which is the default. referenced subtable, or change the current reference to a new one by choosing change reference. Defining the Update Interval
The Update-interval attribute determines the interval at which G2 evaluates the expression contained in the expression attribute. This interval takes effect following the first time G2 evaluates the expression after activation. Conversely, the Wait-interval attribute determines the interval G2 waits before evaluating the plot expression for the first time after activation. Update-interval attribute determines when the expression is evaluated regardless of the value of the Use-local-history? attribute. To recap what the section Defining Where to Obtain History Values describes, that attribute determines whether a plot is using historical values maintained in the trend chart, or the history values of a variable or a parameter. If Use-local-history? is set to no, indicating that a variable or parameter history is being plotted, the expression is still evaluated at the interval that this attribute specifies.
2 seconds, with minimum interval between data points = .5 seconds
minimum interval between data points statement lets you specify the granularity between data points, that is, the amount of time between when G2 saves one data point and the next. This statement is identical to one you could specify for the history keeping specification of variables and parameters, and is described in Specifying a Minimum Interval Between History Data Points.
Specifying the Activation Interval
The Wait-interval attribute determines the interval G2 waits before evaluating the expression in the plot's Expression attribute after activation. Specifying the Update Priority Level
The Update-priority attribute sets the priority level within the scheduler task queue for the trend chart expression. Priority levels range from 1 - 10, with 1 being the highest priority. The default for this attribute is 2. The number you enter affects how soon G2 evaluates a given expression when its task reaches the top of the task queue. Specifying Data Seeking Capabilities
The May-request-data-seeking? attribute specifies whether the trend chart can data seek for an unknown value. When the Use-local-history? attribute is yes, and the plot expression includes a variable or a parameter such as:
95 + X
X is a variable, if the value of X has expired and this attribute is set to yes, the trend chart causes G2 to data seek for a value for X.
Use-simulator? attribute should always be set to no, because the G2 Simulator is a superseded capability. For more information, see Appendix F, Superseded Practices.
Specifying Event Updates
The May-request-event-updates? attribute determines whether the trend chart receives event updates. Forward chaining is one example of an event update. For instance, if a trend chart expression relies on a value that changes, setting this attribute to yes indicates that when the value changes, the expression receives the new value. no, changing values may not forward chain to the trend chart. Defining the Debugging Level
The Tracing-and-breakpoints attribute lets you set tracing and breakpoint levels. Setting this attribute overrides the Tracing-message-level and Breakpoint-level attributes in the Debugging Parameters system table.
Note: The Tracing-and-breakpoints-enabled? attribute of the Debugging Parameters system table must be set to yes for tracing and breakpoints to occur.
Entering an Expression
The Expression attribute specifies what value this plot represents. This attribute is not on the plot defaults subtable. Use-local-history? attribute, described in the section Defining Where to Obtain History Values, as follows:
Note: The value of the plot expression cannot exceed ± 1.7978e304, and will be truncated to this limit.
Summarizing Plot Attributes
The plot component attributes are: