예제 #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()
예제 #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()
예제 #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()
예제 #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()
예제 #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()
예제 #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
예제 #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
예제 #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
예제 #9
0
 def destroy(*args):
     Gcf.destroy(num)
예제 #10
0
 def destroy(self, *args):
     self.window.destroy()
     if Gcf.get_num_fig_managers() == 0 and not matplotlib.is_interactive():
         gtk.main_quit()
예제 #11
0
def destroy_figure(ptr,figman):
    figman.window.hide()
    Gcf.destroy(figman._num)
예제 #12
0
 def close(self):
     Gcf.destroy(self.figman._num)
예제 #13
0
def draw_if_interactive():
    if matplotlib.is_interactive():
        figManager =  Gcf.get_active()
        if figManager is not None:
            figManager.canvas.draw()
예제 #14
0
def destroy_figure(ptr,figman):
    figman.window.hide()
    Gcf.destroy(figman._num)
예제 #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()
예제 #16
0
 def close(self):
     Gcf.destroy(self.figman._num)
예제 #17
0
def draw_if_interactive():
    if matplotlib.is_interactive():
        figManager =  Gcf.get_active()
        if figManager is not None:
            figManager.canvas.draw()