Bases: object
Baseclass for all scalar to RGBA mappings.
Typically, Colormap instances are used to convert data values (floats) from the interval [0, 1]
to the RGBA color that the respective Colormap represents. For scaling of data into the [0, 1]
interval see matplotlib.colors.Normalize
. Subclasses of matplotlib.cm.ScalarMappable
make heavy use of this data -> normalize -> map-to-color
processing chain.
The name of the colormap.
The number of RGB quantization levels.
The data value(s) to convert to RGBA. For floats, X should be in the interval [0.0, 1.0]
to return the RGBA values X*100
percent along the Colormap line. For integers, X should be in the interval [0, Colormap.N)
to return RGBA values indexed from the Colormap with index X
.
Alpha must be a scalar between 0 and 1, a sequence of such floats with shape matching X, or None.
If False (default), the returned RGBA values will be floats in the interval [0, 1]
otherwise they will be numpy.uint8
s in the interval [0, 255]
.
X.shape + (4, )
.
When this colormap exists on a scalar mappable and colorbar_extend is not False, colorbar creation will pick up colorbar_extend
as the default value for the extend
keyword in the matplotlib.colorbar.Colorbar
constructor.
Return a copy of the colormap.
Get the color for masked values.
Get the color for high out-of-range values.
Get the color for low out-of-range values.
Return whether the colormap is grayscale.
Return a new colormap with lutsize entries.
Return a reversed instance of the Colormap.
Note
This function is not implemented for the base class.
The name for the reversed colormap. If None, the name is set to self.name + "_r"
.
Set the color for masked values.
Set the colors for masked (bad) values and, when norm.clip = False
, low (under) and high (over) out-of-range values.
Set the color for high out-of-range values.
Set the color for low out-of-range values.
Return a copy of the colormap, for which the colors for masked (bad) values and, when norm.clip = False
, low (under) and high (over) out-of-range values, have been set accordingly.
matplotlib.colors.Colormap
#
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4