From 6619a4cb055a067e1d19f79384e7e5f19e6342c2 2016-03-02 07:33:42 From: Min RK Date: 2016-03-02 07:33:42 Subject: [PATCH] Merge pull request #9287 from tacaswell/fix_nbagg_lookup FIX: use mpl.get_backend() instead of a global --- diff --git a/IPython/core/pylabtools.py b/IPython/core/pylabtools.py index 6528178..a4a8450 100644 --- a/IPython/core/pylabtools.py +++ b/IPython/core/pylabtools.py @@ -211,7 +211,7 @@ def select_figure_formats(shell, formats, **kwargs): [ f.pop(Figure, None) for f in shell.display_formatter.formatters.values() ] - if matplotlib.backends.backend.lower() == 'nbagg': + if matplotlib.get_backend().lower() == 'nbagg': formatter = shell.display_formatter.ipython_display_formatter formatter.for_type(Figure, _reshow_nbagg_figure)