python colorbar

colorbar(mappable, cax=None, ax=None, use_gridspec=True, **kw) method of matplotlib.figure.Figure instance
    Create a colorbar for a ScalarMappable instance, *mappable*.
    
    Documentation for the pyplot thin wrapper:
    
    
    Add a colorbar to a plot.
    
    Function signatures for the :mod:`~matplotlib.pyplot` interface; all
    but the first are also method signatures for the
    :meth:`~matplotlib.figure.Figure.colorbar` method::
    
      colorbar(**kwargs)
      colorbar(mappable, **kwargs)
      colorbar(mappable, cax=cax, **kwargs)
      colorbar(mappable, ax=ax, **kwargs)
    
    Parameters
    ----------
    mappable :
        The :class:`~matplotlib.image.Image`,
        :class:`~matplotlib.contour.ContourSet`, etc. to
        which the colorbar applies; this argument is mandatory for the Figure
        :meth:`~matplotlib.figure.Figure.colorbar` method but optional for the
        pyplot :func:`~matplotlib.pyplot.colorbar` function, which sets the
        default to the current image.
    
    cax : :class:`~matplotlib.axes.Axes` object, optional
        Axes into which the colorbar will be drawn.
    
    ax : :class:`~matplotlib.axes.Axes`, list of Axes, optional
        Parent axes from which space for a new colorbar axes will be stolen.
        If a list of axes is given they will all be resized to make room for the
        colorbar axes.
    
    use_gridspec : bool, optional
        If *cax* is ``None``, a new *cax* is created as an instance of
        Axes. If *ax* is an instance of Subplot and *use_gridspec* is ``True``,
        *cax* is created as an instance of Subplot using the
        grid_spec module.
    
    
    Returns
    -------
    colorbar : `~matplotlib.c

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值