Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
    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()
Ejemplo n.º 3
0
 def show(cls, *args, **kwargs):
     _Backend.show(*args, **kwargs)
     Gcf.destroy_all()
Ejemplo n.º 4
0
 def trigger(self, sender, event, data=None):
     Gcf.destroy_all()
Ejemplo n.º 5
0
 def close(self):
     Gcf.destroy_all()
Ejemplo n.º 6
0
 def Uninitialize(cls):
     """destroy the module"""
     Gcf.destroy_all()