Strip element STRIPELEMENT options
This page documents the configuration and behavior of strip elements.
STRIPELEMENT denotes an element whose concrete type is StripElement. Strip elements are the default
element type of a stripchart widget:
stripchart .s
.s element create signal
The common element operations such as create, configure, activate, closest, bind, and delete are
documented in ELEMENT.
Strip elements use the same underlying line-rendering machinery as line elements. Their data handling, axis mapping, pens, smoothing, symbols, error bars, value labels, weights, and styles therefore have the same semantics as described in LINEELEMENT.
Differences from line elements
A strip element exposes a restricted line-element option set intended for stripchart use.
In particular, the following LINEELEMENT options are not available for strip elements:
Option |
Line-element feature |
|---|---|
|
area-fill stipple background |
|
area-fill foreground |
|
area filling with a solid or stipple pattern |
|
area fill closure |
|
Cairo/SVG solid area fill opacity |
|
tiled area filling |
|
per-point parameter mapping returned by |
|
line-element state option |
|
filtering of increasing/decreasing X trace directions |
All other options listed below use the same interpretation as the corresponding option on LINEELEMENT.
Data
Strip-element coordinates may be supplied with:
-x
-y
-xdata
-ydata
-data
For example:
.s element create signal -x {0 1 2 3 4} -y {1 4 2 5 3}
RBC vector names may be used instead of literal coordinate lists:
vector create time voltage
time set {0 1 2 3 4}
voltage set {1 4 2 5 3}
.s element create signal -x time -y voltage
The same transactional and left-to-right data-option semantics described for LINEELEMENT apply.
Non-finite data values and values outside the domain of a logarithmic axis form discontinuities in the rendered trace. Points on opposite sides of such a discontinuity are not connected.
Display decimation
Strip elements support -decimate none|auto with the same screen-density decimation semantics described for
LINEELEMENT.
With -decimate auto, dense eligible strip data can be reduced before full world-to-screen mapping. The
persistent data-domain cache supports monotonic X data, ranged Y updates, and pure tail growth of attached RBC
vectors.
This makes -decimate auto particularly suitable for continuously growing stripchart waveforms:
stripchart .s
vector create time voltage
.s element create signal -xdata time -ydata voltage -symbol none -showvalues no -smooth linear -decimate auto
time append $newTime
voltage append $newVoltage
If appended X values preserve the existing monotonic direction, only the newly exposed source data and affected cache summaries need to be examined. Shrinkage, non-monotonic growth, invalid data, or unknown source changes automatically fall back to the more general mapping path.
Decimation affects screen rendering only. PostScript output retains full source resolution.
Smoothing
Strip elements support the same smoothing modes as line elements:
linear
step
natural
cubic
quadratic
catrom
linear is the default.
Spline smoothing operates in mapped screen coordinates. Natural, quadratic, and Catmull-Rom smoothing require at least three mapped points.
As with line elements, spline smoothing never bridges a discontinuity. Each continuous run containing at least three mapped points is smoothed independently. Runs containing fewer than three mapped points remain ordinary linear trace segments.
Pens and symbols
Strip elements use line pens.
The built-in normal pen can be configured directly with options such as:
-color
-linewidth
-dashes
-offdash
-fill
-outline
-outlinewidth
-pixels
-symbol
A separately created line pen may be selected with -pen:
.s pen create tracePen -type line -color blue -linewidth 2
.s element configure signal -pen tracePen
-activepen selects the pen used when the element or individual data points are active.
See LINEELEMENT for detailed descriptions of line pens, symbols, symbol scaling, and symbol-density control.
Error bars of strip elements
Strip elements support the same symmetric and asymmetric error-bar data as line elements:
-xerror
-xlow
-xhigh
-yerror
-ylow
-yhigh
Their appearance is controlled by:
-showerrorbars
-errorbarcolor
-errorbarwidth
-errorbarcap
See LINEELEMENT for the complete error-bar semantics.
X and Y error bands of strip elements
Strip elements support -errorband none|x|y and all five band-style options listed below, with the same
relative/absolute bounds, gap handling, linear/step interpolation, and renderer limitations as line
elements. See the X and Y error bands section in LINEELEMENT. Their lack of ordinary area-fill options
does not prevent error-band filling.
Value labels of strip elements
-valuecommand can replace the label text with a Tcl callback. See the custom value-label text section
in LINEELEMENT for the callback arguments and error handling.
Strip elements can display coordinate values next to their data points using -showvalues.
Label appearance is controlled by:
-valueanchor
-valuecolor
-valuefont
-valuecommand
-valueoffset
-valueformat
-valuerotate
-valueshadow
See LINEELEMENT for value-selection and formatting behavior.
Weights and styles
-weights supplies a numeric weight for each data point and -styles maps weight ranges to named line pens.
The syntax and precedence rules are identical to those described for LINEELEMENT.
Strip element options
The complete strip-element option set is:
Option |
Database name |
Database class |
Default |
Description |
|---|---|---|---|---|
|
|
|
|
Specifies the named line pen used when the element is active. An empty value disables the named active pen. |
|
|
|
|
Specifies additional graph binding tags for the element. |
|
|
|
|
Sets the built-in normal pen’s trace color. |
|
|
|
Empty |
Sets the built-in normal pen’s trace dash pattern. An empty value selects a solid line. Each numeric list item accepts a Tcl integer expression. |
|
|
|
Empty |
Supplies an even-length list of alternating X and Y values. Each literal list item accepts a Tcl numeric expression. |
|
|
|
|
Selects automatic screen-density trace decimation. Accepted values are |
|
|
|
|
Selects none, x or y; fills between the selected error bounds. |
|
|
|
|
Solid, Tk bitmap stipple, or empty to disable the pattern. |
|
|
|
|
Band solid/stipple foreground. |
|
|
|
|
Band stipple background. Empty leaves gaps transparent. |
|
|
|
Empty |
Image tile; takes precedence over the pattern. |
|
|
|
|
Solid opacity 0 to 1, Cairo/SVG only. Native/PostScript ignore it. |
|
|
|
|
Sets the requested error-bar cap width. A positive value selects an explicit size; |
|
|
|
|
Sets the error-bar color. |
|
|
|
|
Sets the error-bar line width. |
|
|
|
|
Sets the symbol fill color. |
|
|
|
|
Controls whether the element is displayed. |
|
|
|
|
Suppresses plotting of the element while keeping it in the display list and legend. A plot-hidden element does not contribute to automatic axis limits and is ignored by closest searches and element hit testing. |
|
|
|
Element name |
Sets the element label used by the legend. The initial label is the element name. |
|
|
|
|
Sets the relief used for the element’s legend label. |
|
|
|
|
Sets the built-in normal pen’s trace width. |
|
|
|
Empty |
Assigns the element to a named ::rbc::TRACKGRAPH track. The selected |
|
|
|
|
Specifies the X axis used to map the element’s X coordinates. The axis must exist and must be an X axis. |
|
|
|
|
Specifies the Y axis used to map the element’s Y coordinates. The axis must exist and must be a Y axis. |
|
|
|
|
Sets the screen-space trace reduction tolerance in pixels. |
|
|
|
|
Selects |
|
|
|
|
Requests a reduced symbol display density when the element contains many points. |
|
|
|
Empty |
Sets the color used for the gaps of a dashed trace. An empty value leaves the gaps transparent; |
|
|
|
|
Sets the symbol outline color. |
|
|
|
|
Sets the non-negative width of symbol outlines. |
|
|
|
Empty |
Specifies a named line pen containing the element’s normal drawing attributes. An empty value uses the element’s built-in pen. |
|
|
|
|
Sets the requested symbol size. |
|
|
|
|
Controls whether symbol sizes are automatically scaled as the axis ranges change. |
|
|
|
|
Selects which error bars are displayed: X, Y, both, or neither. |
|
|
|
|
Selects which coordinate values are displayed next to data points. |
|
|
|
|
Selects line smoothing. Accepted modes are |
|
|
|
Empty |
Specifies pens selected according to |
|
|
|
|
Sets the symbol drawn at data points. |
|
|
|
|
Sets the anchor used to position value labels relative to their data points. |
|
|
|
|
Sets the color used to draw value labels. |
|
|
|
|
Sets the font used to draw value labels. |
|
|
|
Empty |
Formats value labels with a Tcl command prefix. |
|
|
|
|
Moves the label anchor by signed integer pixels. |
|
|
|
|
Sets the printf-style format used for value labels. |
|
|
|
|
Sets the rotation angle of value labels in degrees. |
|
|
|
Empty |
Specifies a shadow for value labels. An empty value disables the shadow. |
|
|
|
Empty |
Supplies per-point numeric weights used to select pens through |
|
|
|
Empty |
Supplies the element’s X coordinates as a list or RBC vector. Each literal list item accepts a Tcl numeric expression. |
|
— |
— |
Empty |
Synonym for |
|
|
|
Empty |
Supplies symmetric X error magnitudes as a list or RBC vector. Each literal list item accepts a Tcl numeric expression. |
|
|
|
Empty |
Supplies the upper X error endpoints as a list or RBC vector. Each literal list item accepts a Tcl numeric expression. |
|
|
|
Empty |
Supplies the lower X error endpoints as a list or RBC vector. Each literal list item accepts a Tcl numeric expression. |
|
|
|
Empty |
Supplies the element’s Y coordinates as a list or RBC vector. Each literal list item accepts a Tcl numeric expression. |
|
— |
— |
Empty |
Synonym for |
|
|
|
Empty |
Supplies symmetric Y error magnitudes as a list or RBC vector. Each literal list item accepts a Tcl numeric expression. |
|
|
|
Empty |
Supplies the upper Y error endpoints as a list or RBC vector. Each literal list item accepts a Tcl numeric expression. |
|
|
|
Empty |
Supplies the lower Y error endpoints as a list or RBC vector. Each literal list item accepts a Tcl numeric expression. |
Copyright (c) George Yashin