本文整理汇总了Python中matplotlib._pylab_helpers.Gcf.destroy方法的典型用法代码示例。如果您正苦于以下问题:Python Gcf.destroy方法的具体用法?Python Gcf.destroy怎么用?Python Gcf.destroy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib._pylab_helpers.Gcf
的用法示例。
在下文中一共展示了Gcf.destroy方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _widgetclosed
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def _widgetclosed( self ):
if self.window._destroying: return
self.window._destroying = True
try:
Gcf.destroy(self.num)
except AttributeError:
pass
示例2: _widgetclosed
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def _widgetclosed(self):
if self.window._destroying:
return
self.window._destroying = True
map(self.canvas.mpl_disconnect, self._cids)
try:
Gcf.destroy(self.num)
except AttributeError:
pass
示例3: new_figure_manager_given_figure
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def new_figure_manager_given_figure(num, figure):
canvas = FigureCanvasNbAgg(figure)
manager = FigureManagerNbAgg(canvas, num)
if is_interactive():
manager.show()
figure.canvas.draw_idle()
canvas.mpl_connect('close_event', lambda event: Gcf.destroy(num))
return manager
示例4: new_figure_manager_given_figure
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def new_figure_manager_given_figure(num, figure):
canvas = FigureCanvasNbAgg(figure)
if rcParams['nbagg.transparent']:
figure.patch.set_alpha(0)
manager = FigureManagerNbAgg(canvas, num)
if is_interactive():
manager.show()
figure.canvas.draw_idle()
canvas.mpl_connect('close_event', lambda event: Gcf.destroy(num))
return manager
示例5: destroy
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def destroy(self, *args):
# check for qApp first, as PySide deletes it in its atexit handler
if QApplication.instance() is None:
return
if self.window._destroying:
return
self.window._destroying = True
if self.toolbar:
self.toolbar.destroy()
self._ads_observer.observeAll(False)
del self._ads_observer
self._fig_interation.disconnect()
self.window.close()
try:
Gcf.destroy(self.num)
except AttributeError:
pass
示例6: close
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def close(self):
Gcf.destroy(self.num)
示例7: destroy
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def destroy(*args):
Gcf.destroy(num)
示例8: destroy
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def destroy(*args):
self.window = None
Gcf.destroy(self._num)
示例9: closer
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def closer(event):
Gcf.destroy(num)
示例10: show
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def show(self, **kwargs):
self.canvas.show()
Gcf.destroy(self._num)
示例11: destroy
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def destroy(self):
self.window.hide()
Fltk.Fl.wait(0) # This is needed to make the last figure vanish.
Gcf.destroy(self._num)
示例12: destroy_figure
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def destroy_figure(ptr, figman):
figman.window.hide()
Fltk.Fl.wait(0) # This is needed to make the last figure vanish.
Gcf.destroy(figman._num)
示例13: show
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def show():
for manager in Gcf.get_all_fig_managers():
manager.show()
# TODO(oleg): Check if it's okay to destroy manager here.
Gcf.destroy(manager.num)
示例14: destroy_figure
# 需要导入模块: from matplotlib._pylab_helpers import Gcf [as 别名]
# 或者: from matplotlib._pylab_helpers.Gcf import destroy [as 别名]
def destroy_figure(self, *args):
# This is the callback from the gui destroy For this specific figure
Gcf.destroy(self.num)