Module wxmpl :: Class Channel

[frames] | no frames]

# Class Channel

source code

Provides data for a `StripCharter` to plot. Subclasses of `Channel` override the template methods `getX()` and `getY()` to provide plot data and call `setChanged(True)` when that data has changed.

Instance Methods

__init__(self, name, color=None, style=None, marker=None) Creates a new `Channel` with the matplotlib label `name`. | source code

getLabel(self) Returns the matplotlib label for this channel of data. | source code

getColor(self) Returns the line color string to use when the line is plotted, or `None` to use an automatically generated color. | source code

getStyle(self) Returns the line style string to use when the line is plotted, or `None` to use the default line style. | source code

getMarker(self) Returns the line marker string to use when the line is plotted, or `None` to use the default line marker. | source code

hasChanged(self) Returns a boolean indicating if the line data has changed. | source code

setChanged(self, changed) Sets the change indicator to the boolean value `changed`. | source code

getX(self) Template method that returns the vector of X axis data or `None` if there is no data available. | source code

getY(self) Template method that returns the vector of Y axis data or `None` if there is no data available. | source code

Method Details

### __init__(self, name, color=None, style=None, marker=None)
(Constructor)

source code

Creates a new `Channel` with the matplotlib label `name`. The keyword arguments specify the strings for the line color, style, and marker to use when the line is plotted.

### setChanged(self, changed)

source code

Sets the change indicator to the boolean value `changed`.

Note: `StripCharter` instances call this method after detecting a change, so a `Channel` cannot be shared among multiple charts.