Download Chaco Documentation - Enthought Tool Suite

Transcript
Chaco Documentation, Release 3.0.0
get_data()
Returns the data for this data source, or (0.0, 0.0) if it has no data.
Overrides ArryDataSource.
reverse_map(pt, index=0, outside_returns_none=True)
Returns the index of pt in the data source.
Overrides ArrayDataSource.
Parameters pt : (x, y)
value to find
index : 0 or 1
Which of the axes of pt the sort_order refers to.
outside_returns_none : Boolean
Whether the method returns None if pt is outside the range of the data source; if False,
the method returns the value of the bound that pt is outside of, in the index dimension.
8.1.5 GridDataSource
class GridDataSource(xdata=array(, [], dtype=float64), ydata=array(, [], dtype=float64), sort_order=(’none’,
’none’), **kwargs)
Bases: enthought.chaco.abstract_data_source.AbstractDataSource
Implements a structured gridded 2-D data source (suitable as an index for an image, for example).
Traits index_dimension : Constant(‘image’)
The dimensionality of the indices into this data source (overrides AbstractDataSource).
value_dimension : Constant(‘scalar’)
The dimensionality of the value at each index point (overrides AbstractDataSource).
sort_order : Tuple(SortOrderTrait, SortOrderTrait)
The sort order of the data (overrides AbstractDataSource). There is no overall sort order
on 2-D data, but for gridded 2-D data, each axis can have a sort order.
get_bounds() -> ((LLx, LLy), (URx, URy))
Implements AbstractDataSource. Returns two 2-D points, min and max, that represent the bounding corners of a rectangle enclosing the data set. Note that these values are not view-dependent, but represent
intrinsic properties of the DataSource.
If data axis is the empty set, then the min and max valuess are 0.0.
get_data() -> (xdata, ydata)
Implements AbstractDataSource. Because this class uses structured (gridded) data, this method returns the
pair of data axes, instead of, for example, a full mesh-grid. This behavious differs from other data sources.
set_data(xdata, ydata, sort_order=None)
Sets the data, and optionally the sort order, for this data source.
Parameters xdata, ydata : array
The data to use.
sort_order : SortOrderTrait
The sort order of the data
8.1.6 ImageData
class ImageData()
Bases: enthought.chaco.abstract_data_source.AbstractDataSource
Represents a grid of data to be plotted using a Numpy 2-D grid.
Contents
63