Exemplo n.º 1
0
def show():
    """
    Show all the figures and enter the gtk mainloop

    This should be the last line of your script
    """
    for manager in Gcf.get_all_fig_managers():
        manager.figure.realize()
Exemplo n.º 2
0
def show():
    """
    Show all the figures and enter the gtk mainloop

    This should be the last line of your script
    """
    for manager in Gcf.get_all_fig_managers():
        manager.figure.realize()
Exemplo n.º 3
0
def show():
    """
    This is usually the last line of a matlab script and tells the
    backend that it is time to draw.  In interactive mode, this may be
    a do nothing func.  See the GTK backend for an example of how to
    handle interactive versus batch mode
    """
    for manager in Gcf.get_all_fig_managers():
        manager.canvas.realize()
Exemplo n.º 4
0
def show():
    """
    This is usually the last line of a matlab script and tells the
    backend that it is time to draw.  In interactive mode, this may be
    a do nothing func.  See the GTK backend for an example of how to
    handle interactive versus batch mode
    """
    for manager in Gcf.get_all_fig_managers():
        manager.canvas.realize()
Exemplo n.º 5
0
def show_xvfb():
    """
    Print the pending figures only then quit, no screen draw
    """
    for manager in Gcf.get_all_fig_managers():
        manager.canvas.set_do_plot(False)
        manager.window.show()

    gtk.idle_add(_quit_after_print_xvfb)
    if gtk.pygtk_version > (2, 3, 90):
        gtk.main()
    else:
        gtk.mainloop()
Exemplo n.º 6
0
def show(mainloop=True):
    """
    Show all the figures and enter the gtk mainloop

    This should be the last line of your script
    """

    for manager in Gcf.get_all_fig_managers():
        manager.window.show()

    if show._needmain and mainloop:
        if gtk.pygtk_version > (2, 3, 90): gtk.main()
        else: gtk.mainloop()
        show._needmain = False
Exemplo n.º 7
0
def show(mainloop=False):
    """
    Show all the figures and enter the fltk mainloop

    This should be the last line of your script
    """
    for manager in Gcf.get_all_fig_managers():
        manager.show()
    #mainloop, if an fltk program exist no need to call that
    #threaded (and interractive) version    
    if show._needmain and mainloop:
        Fltk.Fl.run()
        show._needmain = False
    else:
        thread.start_new_thread(Fltk_run_interactive,())
        show._needmain = False
Exemplo n.º 8
0
def show(mainloop=False):
    """
    Show all the figures and enter the fltk mainloop

    This should be the last line of your script
    """
    for manager in Gcf.get_all_fig_managers():
        manager.show()
    #mainloop, if an fltk program exist no need to call that
    #threaded (and interractive) version    
    if show._needmain and mainloop:
        Fltk.Fl.run()
        show._needmain = False
    else:
        thread.start_new_thread(Fltk_run_interactive,())
        show._needmain = False
Exemplo n.º 9
0
 def destroy(*args):
     Gcf.destroy(num)
Exemplo n.º 10
0
 def destroy(self, *args):
     self.window.destroy()
     if Gcf.get_num_fig_managers() == 0 and not matplotlib.is_interactive():
         gtk.main_quit()
Exemplo n.º 11
0
def destroy_figure(ptr,figman):
    figman.window.hide()
    Gcf.destroy(figman._num)
Exemplo n.º 12
0
 def close(self):
     Gcf.destroy(self.figman._num)
Exemplo n.º 13
0
def draw_if_interactive():
    if matplotlib.is_interactive():
        figManager =  Gcf.get_active()
        if figManager is not None:
            figManager.canvas.draw()
Exemplo n.º 14
0
def destroy_figure(ptr,figman):
    figman.window.hide()
    Gcf.destroy(figman._num)
Exemplo n.º 15
0
def _quit_after_print_xvfb(*args):

    for manager in Gcf.get_all_fig_managers():
        if len(manager.canvas._printQued): break
    else:
        gtk.main_quit()
Exemplo n.º 16
0
 def close(self):
     Gcf.destroy(self.figman._num)
Exemplo n.º 17
0
def draw_if_interactive():
    if matplotlib.is_interactive():
        figManager =  Gcf.get_active()
        if figManager is not None:
            figManager.canvas.draw()