Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions chaco/abstract_data_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@ class AbstractDataRange(HasTraits):
They support "autoscaling" by querying their associated data sources.
"""

# The list of data sources to which this range responds.
#: The list of data sources to which this range responds.
sources = List(Instance(AbstractDataSource))

# The actual value of the lower bound of this range. To set it, use
# low_setting. (Setting this attribute directly just calls the setter for
# low_setting.) Although the default value is specified as 0.0, subclasses
# can redefine the default. Also, subclasses can redefined the type to
# correspond to their dimensionality.
#: The actual value of the lower bound of this range. To set it, use
#: low_setting. (Setting this attribute directly just calls the setter for
#: low_setting.) Although the default value is specified as 0.0, subclasses
#: can redefine the default. Also, subclasses can redefined the type to
#: correspond to their dimensionality.
low = Float(0.0)

# The actual value of the upper bound of this range. To set it, use
# high_setting. (Setting this attribute directly just calls the setter for
# high_setting.) Although the default value is specified as 1.0, subclasses
# can redefine the default. Also, subclasses can redefined the type to
# correspond to their dimensionality.
#: The actual value of the upper bound of this range. To set it, use
#: high_setting. (Setting this attribute directly just calls the setter for
#: high_setting.) Although the default value is specified as 1.0, subclasses
#: can redefine the default. Also, subclasses can redefined the type to
#: correspond to their dimensionality.
high = Float(1.0)

# Setting for the lower bound of this range.
#: Setting for the lower bound of this range.
low_setting = Trait('auto', 'auto', Float)
# Setting for the upper bound of this range.
#: Setting for the upper bound of this range.
high_setting = Trait('auto', 'auto', Float)

# Event that is fired when the actual bounds values change; the value
# of the event is a tuple (low_bound, high_bound)
#: Event that is fired when the actual bounds values change; the value
#: of the event is a tuple (low_bound, high_bound)
updated = Event

#------------------------------------------------------------------------
Expand Down
32 changes: 16 additions & 16 deletions chaco/abstract_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,34 @@ class AbstractDataSource(HasTraits):
possible, domain classes (or an adapter) must implement AbstractDataSource.
"""

# The dimensionality of the value at each index point.
# Subclasses re-declare this trait as a read-only trait with
# the right default value.
#: The dimensionality of the value at each index point.
#: Subclasses re-declare this trait as a read-only trait with
#: the right default value.
value_dimension = DimensionTrait

# The dimensionality of the indices into this data source.
# Subclasses re-declare this trait as a read-only trait with
# the right default value.
#: The dimensionality of the indices into this data source.
#: Subclasses re-declare this trait as a read-only trait with
#: the right default value.
index_dimension = DimensionTrait

# A dictionary keyed on strings. In general, it maps to indices (or tuples
# of indices, depending on **value_dimension**), as in the case of
# selections and annotations. Applications and renderers can add their own
# custom metadata, but must avoid using keys that might result in name
# collision.
#: A dictionary keyed on strings. In general, it maps to indices (or tuples
#: of indices, depending on **value_dimension**), as in the case of
#: selections and annotations. Applications and renderers can add their own
#: custom metadata, but must avoid using keys that might result in name
#: collision.
metadata = Dict

# Event that fires when the data values change.
#: Event that fires when the data values change.
data_changed = Event

# Event that fires when just the bounds change.
#: Event that fires when just the bounds change.
bounds_changed = Event

# Event that fires when metadata structure is changed.
#: Event that fires when metadata structure is changed.
metadata_changed = Event

# Should the data that this datasource refers to be serialized when
# the datasource is serialized?
#: Should the data that this datasource refers to be serialized when
#: the datasource is serialized?
persist_data = Bool(True)

#------------------------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions chaco/abstract_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ class AbstractMapper(HasTraits):
region in output space.
"""

# A generic "update" event that generally means that anything that relies
# on this mapper for visual output should do a redraw or repaint.
#: A generic "update" event that generally means that anything that relies
#: on this mapper for visual output should do a redraw or repaint.
updated = Event

# FIXME: domain_limits is never used

# A tuple representing the minimum and maximum values of the domain (data
# space). The dimensionality of each value varies depending on the
# dimensions of the mapper, so for 1D mappers these will be scalars, for
# image and 2D mappers these will be tuples.
#: A tuple representing the minimum and maximum values of the domain (data
#: space). The dimensionality of each value varies depending on the
#: dimensions of the mapper, so for 1D mappers these will be scalars, for
#: image and 2D mappers these will be tuples.
domain_limits = Tuple(None, None)

def map_screen(self, data_array):
Expand Down
10 changes: 5 additions & 5 deletions chaco/abstract_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ class AbstractOverlay(PlotComponent):
containment-ownership relationship.
"""

# The component that this object overlays. This can be None. By default, if
# this object is called to draw(), it tries to render onto this component.
#: The component that this object overlays. This can be None. By default, if
#: this object is called to draw(), it tries to render onto this component.
component = Instance(Component)

# The default layer that this component draws into.
#: The default layer that this component draws into.
draw_layer = "overlay"

# The background color (overrides PlotComponent).
# Typically, an overlay does not render a background.
#: The background color (overrides PlotComponent).
#: Typically, an overlay does not render a background.
bgcolor = "transparent"

def __init__(self, component=None, *args, **kw):
Expand Down
12 changes: 6 additions & 6 deletions chaco/abstract_plot_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class AbstractPlotData(HasTraits):
# Events that consumers of this data should use
#-------------------------------------------------------------------------

# Indicates that some of the data has changed. The event object must
# be a dict with keys "added", "removed", "changed" and values that are
# lists of strings. This event is used by consumers of this data.
#: Indicates that some of the data has changed. The event object must
#: be a dict with keys "added", "removed", "changed" and values that are
#: lists of strings. This event is used by consumers of this data.
data_changed = Event


Expand All @@ -23,11 +23,11 @@ class AbstractPlotData(HasTraits):
# interact with it. (Typically "consumers" just refers to Plots.)
#-------------------------------------------------------------------------

# Can consumers (Plots) write data back through this interface using
# set_data()?
#: Can consumers (Plots) write data back through this interface using
#: set_data()?
writable = Bool(True)

# Can consumers (Plots) set selections?
#: Can consumers (Plots) set selections?
selectable = Bool(True)


Expand Down
19 changes: 10 additions & 9 deletions chaco/abstract_plot_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class AbstractPlotRenderer(PlotComponent):
# Override default values of inherited traits PlotComponent
#------------------------------------------------------------------------

# Overrides the default value inherited from PlotComponent.
#: Overrides the default value inherited from PlotComponent.
bgcolor = "transparent"

# Overrides the default value inherited from PlotComponent.
#: Overrides the default value inherited from PlotComponent.
resizable = "hv"


Expand Down Expand Up @@ -65,13 +65,14 @@ def map_index(self, screen_pt, threshold=0.0, outside_returns_none=True, \

Returns
-------
An index into the plot's index array(s). Typically this index is just
an integer, but if the plot has a 2-D index dimension, then this method
returns a tuple of integers. If the input point cannot be mapped to an
index, then None is returned.

If *screen_pt* corresponds to multiple indices, then only the first
index is returned.
index : int
An index into the plot's index array(s). Typically this index is just
an integer, but if the plot has a 2-D index dimension, then this method
returns a tuple of integers. If the input point cannot be mapped to an
index, then None is returned.

If *screen_pt* corresponds to multiple indices, then only the first
index is returned.
"""
raise NotImplementedError

Expand Down
14 changes: 7 additions & 7 deletions chaco/array_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ class ArrayDataSource(AbstractDataSource):
# AbstractDataSource traits
#------------------------------------------------------------------------

# The dimensionality of the indices into this data source (overrides
# AbstractDataSource).
#: The dimensionality of the indices into this data source (overrides
#: AbstractDataSource).
index_dimension = Constant('scalar')

# The dimensionality of the value at each index point (overrides
# AbstractDataSource).
#: The dimensionality of the value at each index point (overrides
#: AbstractDataSource).
value_dimension = Constant('scalar')

# The sort order of the data.
# This is a specialized optimization for 1-D arrays, but it's an important
# one that's used everywhere.
#: The sort order of the data.
#: This is a specialized optimization for 1-D arrays, but it's an important
#: one that's used everywhere.
sort_order = SortOrderTrait


Expand Down
12 changes: 6 additions & 6 deletions chaco/array_plot_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class ArrayPlotData(AbstractPlotData):
# Public traits
#-------------------------------------------------------------------------

# Map of names to arrays. Although there is no restriction on the array
# dimensions, each array must correspond to a single plot item; that
# is, a single name must not map to a multi-dimensional array unless
# the array is being used for an image plot or for something that can handle
# multi-dimensional input data.
#: Map of names to arrays. Although there is no restriction on the array
#: dimensions, each array must correspond to a single plot item; that
#: is, a single name must not map to a multi-dimensional array unless
#: the array is being used for an image plot or for something that can handle
#: multi-dimensional input data.
arrays = Dict

# Consumers can write data to this object (overrides AbstractPlotData).
#: Consumers can write data to this object (overrides AbstractPlotData).
writable = True

def __init__(self, *data, **kw):
Expand Down
Loading