Help on module matplotlib.cm in matplotlib:

Help on module matplotlib.cm in matplotlib:

NAME
matplotlib.cm

FILE
d:\programdata\anaconda2\lib\site-packages\matplotlib\cm.py

DESCRIPTION
This module provides a large set of colormaps, functions for
registering new colormaps and for getting a colormap by name,
and a mixin class for adding color mapping functionality.

CLASSES
__builtin__.object
ScalarMappable

class ScalarMappable(__builtin__.object)
| This is a mixin class to support scalar data to RGBA mapping.
| The ScalarMappable makes use of data normalization before returning
| RGBA colors from the given colormap.
|
| Methods defined here:
|
| __init__(self, norm=None, cmap=None)
| Parameters
| ----------
| norm : :class:`matplotlib.colors.Normalize` instance
| The normalizing object which scales data, typically into the
| interval ``[0, 1]``.
| If *None*, *norm* defaults to a *colors.Normalize* object which
| initializes its scaling based on the first data processed.
| cmap : str or :class:`~matplotlib.colors.Colormap` instance
| The colormap used to map normalized data values to RGBA colors.
|
| add_checker(self, checker)
| Add an entry to a dictionary of boolean flags
| that are set to True when the mappable is changed.
|
| autoscale(self)
| Autoscale the scalar limits on the norm instance using the
| current array
|
| autoscale_None(self)
| Autoscale the scalar limits on the norm instance using the
| current array, changing only limits that are None
|
| changed(self)
| Call this whenever the mappable is changed to notify all the
| callbackSM listeners to the 'changed' signal
|
| check_update(self, checker)
| If mappable has changed since the last check,
| return True; else return False
|
| get_array(self)
| Return the array
|
| get_clim(self)
| return the min, max of the color limits for image scaling
|
| get_cmap(self)
| return the colormap
|
| set_array(self, A)
| Set the image array from numpy array *A*.
|
| ..
| ACCEPTS: ndarray
|
| Parameters
| ----------
| A : ndarray
|
| set_clim(self, vmin=None, vmax=None)
| set the norm limits for image scaling; if *vmin* is a length2
| sequence, interpret it as ``(vmin, vmax)`` which is used to
| support setp
|
| ACCEPTS: a length 2 sequence of floats
|
| set_cmap(self, cmap)
| set the colormap for luminance data
|
| ACCEPTS: a colormap or registered colormap name
|
| set_norm(self, norm)
| Set the normalization instance.
|
| ..
| ACCEPTS: `~.Normalize`
|
| Parameters
| ----------
| norm : `~.Normalize`
|
| to_rgba(self, x, alpha=None, bytes=False, norm=True)
| Return a normalized rgba array corresponding to *x*.
|
| In the normal case, *x* is a 1-D or 2-D sequence of scalars, and
| the corresponding ndarray of rgba values will be returned,
| based on the norm and colormap set for this ScalarMappable.
|
| There is one special case, for handling images that are already
| rgb or rgba, such as might have been read from an image file.
| If *x* is an ndarray with 3 dimensions,
| and the last dimension is either 3 or 4, then it will be
| treated as an rgb or rgba array, and no mapping will be done.
| The array can be uint8, or it can be floating point with
| values in the 0-1 range; otherwise a ValueError will be raised.
| If it is a masked array, the mask will be ignored.
| If the last dimension is 3, the *alpha* kwarg (defaulting to 1)
| will be used to fill in the transparency. If the last dimension
| is 4, the *alpha* kwarg is ignored; it does not
| replace the pre-existing alpha. A ValueError will be raised
| if the third dimension is other than 3 or 4.
|
| In either case, if *bytes* is *False* (default), the rgba
| array will be floats in the 0-1 range; if it is *True*,
| the returned rgba array will be uint8 in the 0 to 255 range.
|
| If norm is False, no normalization of the input data is
| performed, and it is assumed to be in the range (0-1).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

FUNCTIONS
get_cmap(name=None, lut=None)
Get a colormap instance, defaulting to rc values if *name* is None.

Colormaps added with :func:`register_cmap` take precedence over
built-in colormaps.

If *name* is a :class:`matplotlib.colors.Colormap` instance, it will be
returned.

If *lut* is not None it must be an integer giving the number of
entries desired in the lookup table, and *name* must be a standard
mpl colormap name.

register_cmap(name=None, cmap=None, data=None, lut=None)
Add a colormap to the set recognized by :func:`get_cmap`.

It can be used in two ways::

register_cmap(name='swirly', cmap=swirly_cmap)

register_cmap(name='choppy', data=choppydata, lut=128)

In the first case, *cmap* must be a :class:`matplotlib.colors.Colormap`
instance. The *name* is optional; if absent, the name will
be the :attr:`~matplotlib.colors.Colormap.name` attribute of the *cmap*.

In the second case, the three arguments are passed to
the :class:`~matplotlib.colors.LinearSegmentedColormap` initializer,
and the resulting colormap is registered.

revcmap(data)
Can only handle specification *data* in dictionary format.

DATA
Accent = <matplotlib.colors.ListedColormap object>
Accent_r = <matplotlib.colors.ListedColormap object>
Blues = <matplotlib.colors.LinearSegmentedColormap object>
Blues_r = <matplotlib.colors.LinearSegmentedColormap object>
BrBG = <matplotlib.colors.LinearSegmentedColormap object>
BrBG_r = <matplotlib.colors.LinearSegmentedColormap object>
BuGn = <matplotlib.colors.LinearSegmentedColormap object>
BuGn_r = <matplotlib.colors.LinearSegmentedColormap object>
BuPu = <matplotlib.colors.LinearSegmentedColormap object>
BuPu_r = <matplotlib.colors.LinearSegmentedColormap object>
CMRmap = <matplotlib.colors.LinearSegmentedColormap object>
CMRmap_r = <matplotlib.colors.LinearSegmentedColormap object>
Dark2 = <matplotlib.colors.ListedColormap object>
Dark2_r = <matplotlib.colors.ListedColormap object>
GnBu = <matplotlib.colors.LinearSegmentedColormap object>
GnBu_r = <matplotlib.colors.LinearSegmentedColormap object>
Greens = <matplotlib.colors.LinearSegmentedColormap object>
Greens_r = <matplotlib.colors.LinearSegmentedColormap object>
Greys = <matplotlib.colors.LinearSegmentedColormap object>
Greys_r = <matplotlib.colors.LinearSegmentedColormap object>
LUTSIZE = 256
OrRd = <matplotlib.colors.LinearSegmentedColormap object>
OrRd_r = <matplotlib.colors.LinearSegmentedColormap object>
Oranges = <matplotlib.colors.LinearSegmentedColormap object>
Oranges_r = <matplotlib.colors.LinearSegmentedColormap object>
PRGn = <matplotlib.colors.LinearSegmentedColormap object>
PRGn_r = <matplotlib.colors.LinearSegmentedColormap object>
Paired = <matplotlib.colors.ListedColormap object>
Paired_r = <matplotlib.colors.ListedColormap object>
Pastel1 = <matplotlib.colors.ListedColormap object>
Pastel1_r = <matplotlib.colors.ListedColormap object>
Pastel2 = <matplotlib.colors.ListedColormap object>
Pastel2_r = <matplotlib.colors.ListedColormap object>
PiYG = <matplotlib.colors.LinearSegmentedColormap object>
PiYG_r = <matplotlib.colors.LinearSegmentedColormap object>
PuBu = <matplotlib.colors.LinearSegmentedColormap object>
PuBuGn = <matplotlib.colors.LinearSegmentedColormap object>
PuBuGn_r = <matplotlib.colors.LinearSegmentedColormap object>
PuBu_r = <matplotlib.colors.LinearSegmentedColormap object>
PuOr = <matplotlib.colors.LinearSegmentedColormap object>
PuOr_r = <matplotlib.colors.LinearSegmentedColormap object>
PuRd = <matplotlib.colors.LinearSegmentedColormap object>
PuRd_r = <matplotlib.colors.LinearSegmentedColormap object>
Purples = <matplotlib.colors.LinearSegmentedColormap object>
Purples_r = <matplotlib.colors.LinearSegmentedColormap object>
RdBu = <matplotlib.colors.LinearSegmentedColormap object>
RdBu_r = <matplotlib.colors.LinearSegmentedColormap object>
RdGy = <matplotlib.colors.LinearSegmentedColormap object>
RdGy_r = <matplotlib.colors.LinearSegmentedColormap object>
RdPu = <matplotlib.colors.LinearSegmentedColormap object>
RdPu_r = <matplotlib.colors.LinearSegmentedColormap object>
RdYlBu = <matplotlib.colors.LinearSegmentedColormap object>
RdYlBu_r = <matplotlib.colors.LinearSegmentedColormap object>
RdYlGn = <matplotlib.colors.LinearSegmentedColormap object>
RdYlGn_r = <matplotlib.colors.LinearSegmentedColormap object>
Reds = <matplotlib.colors.LinearSegmentedColormap object>
Reds_r = <matplotlib.colors.LinearSegmentedColormap object>
Set1 = <matplotlib.colors.ListedColormap object>
Set1_r = <matplotlib.colors.ListedColormap object>
Set2 = <matplotlib.colors.ListedColormap object>
Set2_r = <matplotlib.colors.ListedColormap object>
Set3 = <matplotlib.colors.ListedColormap object>
Set3_r = <matplotlib.colors.ListedColormap object>
Spectral = <matplotlib.colors.LinearSegmentedColormap object>
Spectral_r = <matplotlib.colors.LinearSegmentedColormap object>
Vega10 = <matplotlib.colors.ListedColormap object>
Vega10_r = <matplotlib.colors.ListedColormap object>
Vega20 = <matplotlib.colors.ListedColormap object>
Vega20_r = <matplotlib.colors.ListedColormap object>
Vega20b = <matplotlib.colors.ListedColormap object>
Vega20b_r = <matplotlib.colors.ListedColormap object>
Vega20c = <matplotlib.colors.ListedColormap object>
Vega20c_r = <matplotlib.colors.ListedColormap object>
Wistia = <matplotlib.colors.LinearSegmentedColormap object>
Wistia_r = <matplotlib.colors.LinearSegmentedColormap object>
YlGn = <matplotlib.colors.LinearSegmentedColormap object>
YlGnBu = <matplotlib.colors.LinearSegmentedColormap object>
YlGnBu_r = <matplotlib.colors.LinearSegmentedColormap object>
YlGn_r = <matplotlib.colors.LinearSegmentedColormap object>
YlOrBr = <matplotlib.colors.LinearSegmentedColormap object>
YlOrBr_r = <matplotlib.colors.LinearSegmentedColormap object>
YlOrRd = <matplotlib.colors.LinearSegmentedColormap object>
YlOrRd_r = <matplotlib.colors.LinearSegmentedColormap object>
absolute_import = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0...
afmhot = <matplotlib.colors.LinearSegmentedColormap object>
afmhot_r = <matplotlib.colors.LinearSegmentedColormap object>
autumn = <matplotlib.colors.LinearSegmentedColormap object>
autumn_r = <matplotlib.colors.LinearSegmentedColormap object>
binary = <matplotlib.colors.LinearSegmentedColormap object>
binary_r = <matplotlib.colors.LinearSegmentedColormap object>
bone = <matplotlib.colors.LinearSegmentedColormap object>
bone_r = <matplotlib.colors.LinearSegmentedColormap object>
brg = <matplotlib.colors.LinearSegmentedColormap object>
brg_r = <matplotlib.colors.LinearSegmentedColormap object>
bwr = <matplotlib.colors.LinearSegmentedColormap object>
bwr_r = <matplotlib.colors.LinearSegmentedColormap object>
cmap_d = {u'Spectral': <matplotlib.colors.LinearSegmented...tlib.color...
cmapname = u'afmhot'
cmaps_listed = {'inferno': <matplotlib.colors.ListedColormap object>, ...
cool = <matplotlib.colors.LinearSegmentedColormap object>
cool_r = <matplotlib.colors.LinearSegmentedColormap object>
coolwarm = <matplotlib.colors.LinearSegmentedColormap object>
coolwarm_r = <matplotlib.colors.LinearSegmentedColormap object>
copper = <matplotlib.colors.LinearSegmentedColormap object>
copper_r = <matplotlib.colors.LinearSegmentedColormap object>
cubehelix = <matplotlib.colors.LinearSegmentedColormap object>
cubehelix_r = <matplotlib.colors.LinearSegmentedColormap object>
datad = {u'Spectral': ((0.6196078431372549, 0.0039215686...830>, u'red...
division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192...
flag = <matplotlib.colors.LinearSegmentedColormap object>
flag_r = <matplotlib.colors.LinearSegmentedColormap object>
gist_earth = <matplotlib.colors.LinearSegmentedColormap object>
gist_earth_r = <matplotlib.colors.LinearSegmentedColormap object>
gist_gray = <matplotlib.colors.LinearSegmentedColormap object>
gist_gray_r = <matplotlib.colors.LinearSegmentedColormap object>
gist_heat = <matplotlib.colors.LinearSegmentedColormap object>
gist_heat_r = <matplotlib.colors.LinearSegmentedColormap object>
gist_ncar = <matplotlib.colors.LinearSegmentedColormap object>
gist_ncar_r = <matplotlib.colors.LinearSegmentedColormap object>
gist_rainbow = <matplotlib.colors.LinearSegmentedColormap object>
gist_rainbow_r = <matplotlib.colors.LinearSegmentedColormap object>
gist_stern = <matplotlib.colors.LinearSegmentedColormap object>
gist_stern_r = <matplotlib.colors.LinearSegmentedColormap object>
gist_yarg = <matplotlib.colors.LinearSegmentedColormap object>
gist_yarg_r = <matplotlib.colors.LinearSegmentedColormap object>
gnuplot = <matplotlib.colors.LinearSegmentedColormap object>
gnuplot2 = <matplotlib.colors.LinearSegmentedColormap object>
gnuplot2_r = <matplotlib.colors.LinearSegmentedColormap object>
gnuplot_r = <matplotlib.colors.LinearSegmentedColormap object>
gray = <matplotlib.colors.LinearSegmentedColormap object>
gray_r = <matplotlib.colors.LinearSegmentedColormap object>
hot = <matplotlib.colors.LinearSegmentedColormap object>
hot_r = <matplotlib.colors.LinearSegmentedColormap object>
hsv = <matplotlib.colors.LinearSegmentedColormap object>
hsv_r = <matplotlib.colors.LinearSegmentedColormap object>
inferno = <matplotlib.colors.ListedColormap object>
inferno_r = <matplotlib.colors.ListedColormap object>
jet = <matplotlib.colors.LinearSegmentedColormap object>
jet_r = <matplotlib.colors.LinearSegmentedColormap object>
magma = <matplotlib.colors.ListedColormap object>
magma_r = <matplotlib.colors.ListedColormap object>
nipy_spectral = <matplotlib.colors.LinearSegmentedColormap object>
nipy_spectral_r = <matplotlib.colors.LinearSegmentedColormap object>
ocean = <matplotlib.colors.LinearSegmentedColormap object>
ocean_r = <matplotlib.colors.LinearSegmentedColormap object>
pink = <matplotlib.colors.LinearSegmentedColormap object>
pink_r = <matplotlib.colors.LinearSegmentedColormap object>
plasma = <matplotlib.colors.ListedColormap object>
plasma_r = <matplotlib.colors.ListedColormap object>
print_function = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0)...
prism = <matplotlib.colors.LinearSegmentedColormap object>
prism_r = <matplotlib.colors.LinearSegmentedColormap object>
rainbow = <matplotlib.colors.LinearSegmentedColormap object>
rainbow_r = <matplotlib.colors.LinearSegmentedColormap object>
seismic = <matplotlib.colors.LinearSegmentedColormap object>
seismic_r = <matplotlib.colors.LinearSegmentedColormap object>
spectral = <matplotlib.colors.LinearSegmentedColormap object>
spectral_r = <matplotlib.colors.LinearSegmentedColormap object>
spring = <matplotlib.colors.LinearSegmentedColormap object>
spring_r = <matplotlib.colors.LinearSegmentedColormap object>
summer = <matplotlib.colors.LinearSegmentedColormap object>
summer_r = <matplotlib.colors.LinearSegmentedColormap object>
tab10 = <matplotlib.colors.ListedColormap object>
tab10_r = <matplotlib.colors.ListedColormap object>
tab20 = <matplotlib.colors.ListedColormap object>
tab20_r = <matplotlib.colors.ListedColormap object>
tab20b = <matplotlib.colors.ListedColormap object>
tab20b_r = <matplotlib.colors.ListedColormap object>
tab20c = <matplotlib.colors.ListedColormap object>
tab20c_r = <matplotlib.colors.ListedColormap object>
terrain = <matplotlib.colors.LinearSegmentedColormap object>
terrain_r = <matplotlib.colors.LinearSegmentedColormap object>
unicode_literals = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', ...
viridis = <matplotlib.colors.ListedColormap object>
viridis_r = <matplotlib.colors.ListedColormap object>
winter = <matplotlib.colors.LinearSegmentedColormap object>
winter_r = <matplotlib.colors.LinearSegmentedColormap object>

转载于:https://www.cnblogs.com/YingxuanZHANG/p/8808077.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值