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()
def show(cls, *args, **kwargs): _Backend.show(*args, **kwargs) Gcf.destroy_all()
def trigger(self, sender, event, data=None): Gcf.destroy_all()
def close(self): Gcf.destroy_all()
def Uninitialize(cls): """destroy the module""" Gcf.destroy_all()