def configure_subplots(self, *args): window = Fltk.Fl_Double_Window(100, 100, 480, 240) toolfig = Figure(figsize=(6, 3)) canvas = FigureCanvasFltkAgg(toolfig) window.end() toolfig.subplots_adjust(top=0.9) tool = SubplotTool(self.canvas.figure, toolfig) window.show() canvas.show()
def new_figure_manager(num, *args, **kwargs): """ Create a new figure manager instance """ figure = Figure(*args, **kwargs) canvas = FigureCanvasFltkAgg(figure) window = Fltk.Fl_Double_Window(10, 10, 30, 30) window.end() figManager = FigureManagerFltkAgg(canvas, num, window) return figManager
def new_figure_manager_given_figure(num, figure): """ Create a new figure manager instance for the given figure. """ window = Fltk.Fl_Double_Window(10, 10, 30, 30) canvas = FigureCanvasFltkAgg(figure) window.end() #Fltk.Fl.visual(Fltk.FL_DOUBLE) window.show() window.make_current() figManager = FigureManagerFltkAgg(canvas, num, window) if matplotlib.is_interactive(): figManager.show() return figManager
def new_figure_manager(num, *args, **kwargs): """ Create a new figure manager instance """ figure = Figure(*args, **kwargs) window = Fltk.Fl_Double_Window(10, 10, 30, 30) canvas = FigureCanvasFltkAgg(figure) window.end() window.show() window.make_current() figManager = FigureManagerFltkAgg(canvas, num, window) if matplotlib.is_interactive(): figManager.show() return figManager