File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -150,12 +150,14 @@ def _enable_matplotlib_integration():
150150 ip = get_ipython ()
151151 backend = get_backend ()
152152 if ip and backend == 'module://%s' % __name__ :
153- from IPython .core .pylabtools import configure_inline_support
153+ from IPython .core .pylabtools import configure_inline_support , activate_matplotlib
154154 try :
155+ activate_matplotlib (backend )
155156 configure_inline_support (ip , backend )
156- except ImportError :
157+ except ( ImportError , AttributeError ) :
157158 # bugs may cause a circular import on Python 2
158159 def configure_once (* args ):
160+ activate_matplotlib (backend )
159161 configure_inline_support (ip , backend )
160162 ip .events .unregister ('post_run_cell' , configure_once )
161163 ip .events .register ('post_run_cell' , configure_once )
You can’t perform that action at this time.
0 commit comments