chaco.discrete_color_mapper module¶
-
class
chaco.discrete_color_mapper.
DiscreteColorMapper
¶ Bases:
chaco.abstract_colormap.AbstractColormap
Very simple colormaper for categorical data
This colormapper holds a palette of colors and expects to be given and array of integer values between 0 and the number of colors - 1.
Values outside this range will be clipped.
-
classmethod
from_colormap
(colormap, steps, **traits)¶ Creates a discrete color mapper from a palette array.
-
classmethod
from_palette_array
(palette, **traits)¶ Creates a discrete color mapper from a palette array.
-
map_index
(data)¶ Maps an array of data to an array of indexes into the palette
-
map_screen
(data)¶ Maps an array of data to an array of colors
-
map_uint8
(data)¶ Maps an array of data to an array of colors
-
name
= Str¶ the name of the colormap
-
palette
= Array(shape=(None, (3, 4)), dtype=float)¶ the palette of colors
-
reverse_colormap
()¶ Reverses the palette of this colormap.
-
classmethod