本文整理汇总了Python中matplotlib._pylab_helpers.Gcf.destroy_all方法的典型用法代码示例。如果您正苦于以下问题:Python Gcf.destroy_all方法的具体用法?Python Gcf.destroy_all怎么用?Python Gcf.destroy_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib._pylab_helpers.Gcf
的用法示例。
在下文中一共展示了Gcf.destroy_all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __call__
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy_all [as 别名]
def __call__(self, close=None, block=None, **kwargs):
if close is None:
close = mpl_config.get('close')
try:
managers = Gcf.get_all_fig_managers()
if not managers:
return
# Tell zeppelin that the output will be html using the %html magic
# We want to do this only once to avoid seeing "%html" printed
# directly to the outout when multiple figures are displayed from
# one paragraph.
if mpl_config.get('angular'):
print('%angular')
else:
print('%html')
# Show all open figures
for manager in managers:
manager.show(**kwargs)
finally:
# This closes all the figures if close is set to True.
if close and Gcf.get_all_fig_managers():
Gcf.destroy_all()
示例2: trigger
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy_all [as 别名]
def trigger(self, sender, event, data=None):
Gcf.destroy_all()