chaco.abstract_mapper module

Defines the base class for mappings.

class chaco.abstract_mapper.AbstractMapper

Bases: traits.has_traits.HasTraits

Defines an abstract mapping from a region in input space to a region in output space.

domain_limits = Tuple(None, None)

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.

map_data(screen_val)data_val

Maps values from screen space into data space.

map_data_array(screen_vals)data_vals

Maps an array of values from screen space into data space. By default, this method just loops over the points, calling map_data() on each one. For vectorizable mapping functions, override this implmentation with a faster one.

map_screen(data_array)screen_array

Maps values from data space into screen space.

updated = Event

A generic “update” event that generally means that anything that relies on this mapper for visual output should do a redraw or repaint.