monet.plots.colorbars
Colorbar helper functions
Functions
|
Return a discrete colormap from the continuous colormap cmap. |
|
- monet.plots.colorbars.cmap_discretize(cmap, N)
Return a discrete colormap from the continuous colormap cmap.
cmap: colormap instance, eg. cm.jet. N: number of colors.
- Example
x = resize(arange(100), (5,100)) djet = cmap_discretize(cm.jet, 5) imshow(x, cmap=djet)