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


Python Figure.savefig方法代码示例

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


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

示例1: draw

# 需要导入模块: from matplotlib.figure import Figure [as 别名]
# 或者: from matplotlib.figure.Figure import savefig [as 别名]
def draw():
    """
    Redraw the current figure.

    This is used in interactive mode to update a figure that
    has been altered using one or more plot object method calls;
    it is not needed if figure modification is done entirely
    with pyplot functions, if a sequence of modifications ends
    with a pyplot function, or if matplotlib is in non-interactive
    mode and the sequence of modifications ends with :func:`show` or
    :func:`savefig`.

    A more object-oriented alternative, given any
    :class:`~matplotlib.figure.Figure` instance, :attr:`fig`, that
    was created using a :mod:`~matplotlib.pyplot` function, is::

        fig.canvas.draw()


    """
    get_current_fig_manager().canvas.draw() 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:23,代码来源:pyplot.py

示例2: savefig

# 需要导入模块: from matplotlib.figure import Figure [as 别名]
# 或者: from matplotlib.figure.Figure import savefig [as 别名]
def savefig(*args, **kwargs):
    fig = gcf()
    res = fig.savefig(*args, **kwargs)
    fig.canvas.draw_idle()   # need this if 'transparent=True' to reset colors
    return res 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:7,代码来源:pyplot.py

示例3: savefig

# 需要导入模块: from matplotlib.figure import Figure [as 别名]
# 或者: from matplotlib.figure.Figure import savefig [as 别名]
def savefig(*args, **kwargs):
    fig = gcf()
    return fig.savefig(*args, **kwargs) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:5,代码来源:pyplot.py

示例4: savefig

# 需要导入模块: from matplotlib.figure import Figure [as 别名]
# 或者: from matplotlib.figure.Figure import savefig [as 别名]
def savefig(*args, **kwargs):
    fig = gcf()
    res = fig.savefig(*args, **kwargs)
    draw()   # need this if 'transparent=True' to reset colors
    return res 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:pyplot.py


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