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 |
|
screen-space trace reduction |
|
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.
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 |
Description |
|---|---|---|---|
|
|
|
Specifies the named line pen used when the element is active. An empty value disables the named active pen. The default is |
|
|
|
Specifies additional graph binding tags for the element. The default is |
|
|
|
Sets the built-in normal pen’s trace color. The default is navy blue. |
|
|
|
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. |
|
|
|
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 |
|
|
|
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. The default is |
|
|
|
Sets the symbol fill color. |
|
|
|
Controls whether the element is displayed. The default is |
|
|
|
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. The default is |
|
|
|
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. The default is |
|
|
|
Sets the built-in normal pen’s trace width. The default is |
|
|
|
Specifies the X axis used to map the element’s X coordinates. The axis must exist and must be an X axis. The default is |
|
|
|
Specifies the Y axis used to map the element’s Y coordinates. The axis must exist and must be a Y axis. The default is |
|
|
|
Requests a reduced symbol display density when the element contains many points. |
|
|
|
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. The default is |
|
|
|
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. The default is |
|
|
|
Controls whether symbol sizes are automatically scaled as the axis ranges change. The default is |
|
|
|
Selects which error bars are displayed: X, Y, both, or neither. The default is |
|
|
|
Selects which coordinate values are displayed next to data points. The default is |
|
|
|
Selects line smoothing. Accepted modes are |
|
|
|
Specifies pens selected according to |
|
|
|
Sets the symbol drawn at data points. The default is |
|
|
|
Sets the anchor used to position value labels relative to their data points. The default is |
|
|
|
Sets the color used to draw value labels. |
|
|
|
Sets the font used to draw value labels. |
|
|
|
Formats value labels with a Tcl command prefix. The default is empty. |
|
|
|
Moves the label anchor by signed integer pixels. Default: |
|
|
|
Sets the printf-style format used for value labels. The default is |
|
|
|
Sets the rotation angle of value labels in degrees. The default is |
|
|
|
Specifies a shadow for value labels. An empty value disables the shadow. |
|
|
|
Supplies per-point numeric weights used to select pens through |
|
|
|
Supplies the element’s X coordinates as a list or Rbc vector. Each literal list item accepts a Tcl numeric expression. |
|
— |
— |
Synonym for |
|
|
|
Supplies symmetric X error magnitudes as a list or Rbc vector. Each literal list item accepts a Tcl numeric expression. |
|
|
|
Supplies the upper X error endpoints as a list or Rbc vector. Each literal list item accepts a Tcl numeric expression. |
|
|
|
Supplies the lower X error endpoints as a list or Rbc vector. Each literal list item accepts a Tcl numeric expression. |
|
|
|
Supplies the element’s Y coordinates as a list or Rbc vector. Each literal list item accepts a Tcl numeric expression. |
|
— |
— |
Synonym for |
|
|
|
Supplies symmetric Y error magnitudes as a list or Rbc vector. Each literal list item accepts a Tcl numeric expression. |
|
|
|
Supplies the upper Y error endpoints as a list or Rbc vector. Each literal list item accepts a Tcl numeric expression. |
|
|
|
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