def new_figure_manager(num, *args, **kwargs):
 _focus = windowing.FocusManager()
 FigureClass = kwargs.pop('FigureClass', Figure)
 figure = FigureClass(*args, **kwargs)
 window = Tk.Tk()
 canvas = FigureCanvasTkAgg(figure, master=window)
 figManager = FigureManagerTkAgg(canvas, num, window)
 if matplotlib.is_interactive():
  figManager.show()
 return figManager

def new_figure_manager ( num , * args , ** kwargs ) : _focus = windowing . FocusManager ( ) FigureClass = kwargs . pop ( 'FigureClass' , Figure ) figure = FigureClass ( * args , ** kwargs ) window = Tk . Tk ( ) canvas = FigureCanvasTkAgg ( figure , master = window ) figManager = FigureManagerTkAgg ( canvas , num , window ) if matplotlib . is_interactive ( ) : figManager . show ( ) return figManager
create a new figure manager instance .