##// END OF EJS Templates
Merge pull request #10059 from minrk/rebase-9885...
Thomas Kluyver -
r23019:3a3686ac merge
parent child Browse files
Show More
@@ -23,7 +23,9 b" backends = {'tk': 'TkAgg',"
23 'nbagg': 'nbAgg',
23 'nbagg': 'nbAgg',
24 'notebook': 'nbAgg',
24 'notebook': 'nbAgg',
25 'agg': 'agg',
25 'agg': 'agg',
26 'inline' : 'module://ipykernel.pylab.backend_inline'}
26 'inline': 'module://ipykernel.pylab.backend_inline',
27 'ipympl': 'module://ipympl.backend_nbagg',
28 }
27
29
28 # We also need a reverse backends2guis mapping that will properly choose which
30 # We also need a reverse backends2guis mapping that will properly choose which
29 # GUI support to activate based on the desired matplotlib backend. For the
31 # GUI support to activate based on the desired matplotlib backend. For the
@@ -221,8 +223,8 b' def select_figure_formats(shell, formats, **kwargs):'
221 formats = set(formats)
223 formats = set(formats)
222
224
223 [ f.pop(Figure, None) for f in shell.display_formatter.formatters.values() ]
225 [ f.pop(Figure, None) for f in shell.display_formatter.formatters.values() ]
224
226 mplbackend = matplotlib.get_backend().lower()
225 if matplotlib.get_backend().lower() == 'nbagg':
227 if mplbackend == 'nbagg' or mplbackend == 'module://ipympl.backend_nbagg':
226 formatter = shell.display_formatter.ipython_display_formatter
228 formatter = shell.display_formatter.ipython_display_formatter
227 formatter.for_type(Figure, _reshow_nbagg_figure)
229 formatter.for_type(Figure, _reshow_nbagg_figure)
228
230
General Comments 0
You need to be logged in to leave comments. Login now