当前位置: 首页>>代码示例>>Python>>正文


Python cm.hot方法代码示例

本文整理汇总了Python中matplotlib.cm.hot方法的典型用法代码示例。如果您正苦于以下问题:Python cm.hot方法的具体用法?Python cm.hot怎么用?Python cm.hot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在matplotlib.cm的用法示例。


在下文中一共展示了cm.hot方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: sci

# 需要导入模块: from matplotlib import cm [as 别名]
# 或者: from matplotlib.cm import hot [as 别名]
def sci(im):
    """
    Set the current image.  This image will be the target of colormap
    commands like :func:`~matplotlib.pyplot.jet`,
    :func:`~matplotlib.pyplot.hot` or
    :func:`~matplotlib.pyplot.clim`).  The current image is an
    attribute of the current axes.
    """
    gca()._sci(im)


## Any Artist ##
# (getp is simply imported) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:15,代码来源:pyplot.py

示例2: hot

# 需要导入模块: from matplotlib import cm [as 别名]
# 或者: from matplotlib.cm import hot [as 别名]
def hot():
    '''
    set the default colormap to hot and apply to current image if any.
    See help(colormaps) for more information
    '''
    rc('image', cmap='hot')
    im = gci()

    if im is not None:
        im.set_cmap(cm.hot)
    draw_if_interactive()


# This function was autogenerated by boilerplate.py.  Do not edit as
# changes will be lost 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:17,代码来源:pyplot.py

示例3: hot

# 需要导入模块: from matplotlib import cm [as 别名]
# 或者: from matplotlib.cm import hot [as 别名]
def hot():
    """
    Set the colormap to "hot".

    This changes the default colormap as well as the colormap of the current
    image if there is one. See ``help(colormaps)`` for more information.
    """
    set_cmap("hot")

# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:12,代码来源:pyplot.py

示例4: hot

# 需要导入模块: from matplotlib import cm [as 别名]
# 或者: from matplotlib.cm import hot [as 别名]
def hot():
    """
    Set the colormap to "hot".

    This changes the default colormap as well as the colormap of the current
    image if there is one. See ``help(colormaps)`` for more information.
    """
    set_cmap("hot")


# Autogenerated by boilerplate.py.  Do not edit as changes will be lost. 
开发者ID:holzschu,项目名称:python3_ios,代码行数:13,代码来源:pyplot.py

示例5: _show_td_1d

# 需要导入模块: from matplotlib import cm [as 别名]
# 或者: from matplotlib.cm import hot [as 别名]
def _show_td_1d(TD, frame_rate=24, pre_compute_frames=True, repeat=False):
    assert TD.dim != 1, f"Expected TD dimension to be 1. It was: {TD.dim}"
    fig = plt.figure()
    interval = 1e3 / frame_rate  # in ms
    x_dim = TD.x.max() + 1
    tMax = TD.t.max()
    tMin = TD.t.min()
    pMax = TD.p.max() + 1
    min_frame = int(np.floor(tMin / interval))
    max_frame = int(np.ceil(tMax / interval)) + 1

    # ignore pre_compute_frames

    def animate(i):
        fig.clear()
        t_end = (i + min_frame + 1) * interval
        ind = TD.t < t_end
        # plot raster
        plt.plot(TD.t[ind], TD.x[ind], ".")
        # plt.plot(TD.t[ind], TD.x[ind], '.', c=cm.hot(TD.p[ind]))
        # plot raster scan line
        plt.plot([t_end + interval, t_end + interval], [0, x_dim])
        plt.axis((tMin - 0.1 * tMax, 1.1 * tMax, -0.1 * x_dim, 1.1 * x_dim))
        plt.draw()

    anim = animation.FuncAnimation(
        fig, animate, frames=max_frame, interval=42, repeat=repeat
    )  # 42 means playback at 23.809 fps

    return anim 
开发者ID:BasBuller,项目名称:PySNN,代码行数:32,代码来源:file_io.py


注:本文中的matplotlib.cm.hot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。