Bases: enthought.traits.has_traits.HasTraits
Abstract class for ranges that represent sub-regions of data space.
They support “autoscaling” by querying their associated data sources.
Traits: | sources : List(Instance(AbstractDataSource))
low : Float(0.0)
high : Float(1.0)
low_setting : Trait(‘auto’, ‘auto’, Float)
high_setting : Trait(‘auto’, ‘auto’, Float)
updated : Event
|
---|
Returns a tuple of indices for the start and end of the first run of data that falls within the range.
Given an array of data values of the same dimensionality as the range, returns a tuple of indices (start, end) corresponding to the first and last elements of the first run of data that falls within the range. For monotonic data, this basically returns the first and last elements that fall within the range. Using this method is not advised for non-monotonic data; in that case, it returns the first and last elements of the first “chunk” of data that falls within the range.
Returns a list of data values that are within the range.
Given an array of data values of the same dimensionality as the range, returns a list of data values that are inside the range.
Returns a mask array, indicating whether values in the given array are inside the range.
Given an array of data values of the same dimensionality as the range, this method returns a mask array of the same length as data, filled with 1s and 0s corresponding to whether the data value at that index is inside or outside the range.
Sets all the bounds of the range simultaneously.
Because each bounds change probably fires an event, this method allows tools to set all range elements in a single, atomic step.
Parameters: | new_bounds : a tuple of (low, high)
This method not only reduces the number of spurious events (the : ones that result from having to set both **high and low), but also** : allows listeners to differentiate between translation and resize : operations. : |
---|
Bases: enthought.chaco.abstract_data_range.AbstractDataRange
Ranges represent sub-regions of data space.
They support “autoscaling” by querying their associated data sources.
Bases: enthought.chaco.base_data_range.BaseDataRange
Represents a 1-D data range.
Traits: | low : Property
high : Property
low_setting : Property(Trait(‘auto’, ‘auto’, ‘track’, CFloat))
high_setting : Property(Trait(‘auto’, ‘auto’, ‘track’, CFloat))
tight_bounds : Bool(True)
bounds_func : Callable
margin : Float(0.05)
epsilon : CFloat(1e-020)
default_tracking_amount : CFloat(20.0)
tracking_amount : default_tracking_amount
default_state : Enum(‘auto’, ‘high_track’, ‘low_track’)
fit_to_subset : Bool(False)
|
---|
Returns a tuple of indices for the start and end of the first run of data that falls within the range.
Implements AbstractDataRange.
Returns a list of data values that are within the range.
Implements AbstractDataRange.
Returns a mask array, indicating whether values in the given array are inside the range.
Implements AbstractDataRange.
Sets all the bounds of the range simultaneously.
Implements AbstractDataRange.
Bases: enthought.chaco.base_data_range.BaseDataRange
A range on (2-D) image data.
In a mathematically general sense, a 2-D range is an arbitrary region in the plane. Arbitrary regions are difficult to implement well, so this class supports only rectangular regions for now.
Traits: | low : Property
high : Property
low_setting : Property
high_setting : Property
x_range : Property
y_range : Property
tight_bounds : Tuple(Bool(True), Bool(True))
epsilon : Tuple(CFloat(0.0001), CFloat(0.0001))
|
---|
Returns a list of data values that are within the range.
Implements AbstractDataRange.
Returns a mask array, indicating whether values in the given array are inside the range.
Implements AbstractDataRange.
Sets all the bounds of the range simultaneously.
Implements AbstractDataRange.
Parameters: | low : (x,y)
high : (x,y)
|
---|