code: def new_figure_manager(num, *args, **kwargs):
      
      # in order to expose the Figure constructor to the pylab
      # interface we need to create the figure here
      DEBUG_MSG("new_figure_manager()", 3, None)
      _create_wx_app()
  
      FigureClass = kwargs.pop('FigureClass', Figure)
      fig = FigureClass(*args, **kwargs)
      return new_figure_manager_given_figure(num, fig)
docs: Create a new figure manager instance