def new_figure_manager_given_figure ( num , figure ) : fig = figure frame = FigureFrameWx ( num , fig ) figmgr = frame . get_figure_manager ( ) if matplotlib . is_interactive ( ) : figmgr . frame . Show ( ) return figmgr
python return fig 'figure' object
Create a new figure manager instance for the given figure .
def new_figure_manager_given_figure(num, figure):
    """
    Create a new figure manager instance for the given figure.
    """
    fig = figure
    frame = FigureFrameWx(num, fig)
    figmgr = frame.get_figure_manager()
    if matplotlib.is_interactive():
        figmgr.frame.Show()

    return figmgr