'Create a new figure manager instance for the given figure.'

@staticmethod
def new_figure_manager_given_figure(num, figure):

    _focus = windowing.FocusManager()
    window = Tk.Tk(className=u'matplotlib')
    window.withdraw()
    icon_fname = os.path.join(rcParams[u'datapath'], u'images', u'matplotlib.ppm')
    icon_img = Tk.PhotoImage(file=icon_fname)
    try:
        window.tk.call(u'wm', u'foobar', window._w, icon_img)
    except Exception as exc:
        verbose.report((u'Could    not    load    matplotlib    icon:    %s' % exc))
    canvas = FigureCanvasTkAgg(figure, master=window)
    manager = FigureManagerTkAgg(canvas, num, window)
    if matplotlib.is_interactive():
        manager.show()
        canvas.draw_idle()
    return manager
