plot.py 文件源码

python
阅读 40 收藏 0 点赞 0 评论 0

项目:circletracking 作者: caspervdw 项目源码 文件源码
def norm_axesimage(ax, vmin, vmax):
    try:
        axim = ax.get_images()[0]
    except IndexError:
        return
    im = axim.get_array()
    if im.ndim == 3:  # RGB, custom norm
        if vmax - vmin > 0:
            # the masked array may give underflowerror here
            with np.errstate(under='ignore'):
                axim.set_array((im - vmin) / (vmax - vmin))
        axim.set_clim(0, 1)  # this is actually ignored for RGB by mpl
    else:  # use built-in
        axim.set_clim(vmin, vmax)
    return axim
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号