本文整理匯總了Python中matplotlib._pylab_helpers.Gcf.get_num_fig_managers方法的典型用法代碼示例。如果您正苦於以下問題:Python Gcf.get_num_fig_managers方法的具體用法?Python Gcf.get_num_fig_managers怎麽用?Python Gcf.get_num_fig_managers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類matplotlib._pylab_helpers.Gcf
的用法示例。
在下文中一共展示了Gcf.get_num_fig_managers方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: destroy
# 需要導入模塊: from matplotlib._pylab_helpers import Gcf [as 別名]
# 或者: from matplotlib._pylab_helpers.Gcf import get_num_fig_managers [as 別名]
def destroy(self, *args):
if _debug: print('FigureManagerGTK.%s' % fn_name())
if hasattr(self, 'toolbar') and self.toolbar is not None:
self.toolbar.destroy()
if hasattr(self, 'vbox'):
self.vbox.destroy()
if hasattr(self, 'window'):
self.window.destroy()
if hasattr(self, 'canvas'):
self.canvas.destroy()
self.__dict__.clear() #Is this needed? Other backends don't have it.
if Gcf.get_num_fig_managers()==0 and \
not matplotlib.is_interactive() and \
gtk.main_level() >= 1:
gtk.main_quit()
示例2: destroy
# 需要導入模塊: from matplotlib._pylab_helpers import Gcf [as 別名]
# 或者: from matplotlib._pylab_helpers.Gcf import get_num_fig_managers [as 別名]
def destroy(self, *args):
if self.window is not None:
#self.toolbar.destroy()
if self.canvas._idle_callback:
self.canvas._tkcanvas.after_cancel(self.canvas._idle_callback)
self.window.destroy()
if Gcf.get_num_fig_managers()==0:
if self.window is not None:
self.window.quit()
self.window = None
示例3: destroy
# 需要導入模塊: from matplotlib._pylab_helpers import Gcf [as 別名]
# 或者: from matplotlib._pylab_helpers.Gcf import get_num_fig_managers [as 別名]
def destroy(self, *args):
if _debug: print 'FigureManagerGTK3.%s' % fn_name()
self.vbox.destroy()
self.window.destroy()
self.canvas.destroy()
if self.toolbar:
self.toolbar.destroy()
self.__dict__.clear() #Is this needed? Other backends don't have it.
if Gcf.get_num_fig_managers()==0 and \
not matplotlib.is_interactive() and \
Gtk.main_level() >= 1:
Gtk.main_quit()
示例4: destroy
# 需要導入模塊: from matplotlib._pylab_helpers import Gcf [as 別名]
# 或者: from matplotlib._pylab_helpers.Gcf import get_num_fig_managers [as 別名]
def destroy(self, *args):
self.vbox.destroy()
self.window.destroy()
self.canvas.destroy()
if self.toolbar:
self.toolbar.destroy()
if (Gcf.get_num_fig_managers() == 0 and
not matplotlib.is_interactive() and
Gtk.main_level() >= 1):
Gtk.main_quit()
示例5: destroy
# 需要導入模塊: from matplotlib._pylab_helpers import Gcf [as 別名]
# 或者: from matplotlib._pylab_helpers.Gcf import get_num_fig_managers [as 別名]
def destroy(self, *args):
if self.window is not None:
#self.toolbar.destroy()
if self.canvas._idle_callback:
self.canvas._tkcanvas.after_cancel(self.canvas._idle_callback)
self.window.destroy()
if Gcf.get_num_fig_managers() == 0:
if self.window is not None:
self.window.quit()
self.window = None
示例6: destroy
# 需要導入模塊: from matplotlib._pylab_helpers import Gcf [as 別名]
# 或者: from matplotlib._pylab_helpers.Gcf import get_num_fig_managers [as 別名]
def destroy(self, *args):
if _debug: print('FigureManagerGTK3.%s' % fn_name())
self.vbox.destroy()
self.window.destroy()
self.canvas.destroy()
if self.toolbar:
self.toolbar.destroy()
if Gcf.get_num_fig_managers()==0 and \
not matplotlib.is_interactive() and \
Gtk.main_level() >= 1:
Gtk.main_quit()
示例7: destroy
# 需要導入模塊: from matplotlib._pylab_helpers import Gcf [as 別名]
# 或者: from matplotlib._pylab_helpers.Gcf import get_num_fig_managers [as 別名]
def destroy(self, *args):
if hasattr(self, 'toolbar') and self.toolbar is not None:
self.toolbar.destroy()
if hasattr(self, 'vbox'):
self.vbox.destroy()
if hasattr(self, 'window'):
self.window.destroy()
if hasattr(self, 'canvas'):
self.canvas.destroy()
self.__dict__.clear() #Is this needed? Other backends don't have it.
if Gcf.get_num_fig_managers()==0 and \
not matplotlib.is_interactive() and \
gtk.main_level() >= 1:
gtk.main_quit()