'If using a GUI backend with pyplot, display the figure window.
If the figure was not created using
:func:`~matplotlib.pyplot.figure`, it will lack a
:class:`~matplotlib.backend_bases.FigureManagerBase`, and
will raise an AttributeError.
For non-GUI backends, this does nothing, in which case
a warning will be issued if *warn* is True (default).'

def show(self, warn=True):

    try:
        manager = getattr(self.canvas, u'manager')
    except AttributeError as err:
        raise AttributeError((u'%s\nFigure.show    works    only    for    figures    managed    by    pyplot,    normally    created    by    pyplot.figure().' % err))
    if (manager is not None):
        try:
            manager.show()
            return
        except NonGuiException:
            pass
    if warn:
        import warnings
        warnings.warn(u'matplotlib    is    currently    using    a    non-GUI    backend,    so    cannot    show    the    figure')
