chaco.linear_mapper module

Defines the LinearMapper class, which maps from a 1-D region in data space into a 1-D output space.

class chaco.linear_mapper.LinearMapper

Bases: chaco.base_1d_mapper.Base1DMapper

Maps a 1-D data space to and from screen space by specifying a range in data space and a corresponding fixed line in screen space.

This class concerns itself only with metric and not with orientation. So, to “flip” the screen space orientation, simply swap the values for low_pos and high_pos.

map_data(screen_val)data_val

Overrides AbstractMapper. Maps values from screen space into data space.

map_data_array(screen_vals)data_vals

Overrides AbstractMapper. Maps an array of values from screen space into data space.

map_screen(data_array)screen_array

Overrides AbstractMapper. Maps values from data space into screen space.