We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c3fd5e commit 0c5ff18Copy full SHA for 0c5ff18
1 file changed
backend_inline.py
@@ -150,12 +150,14 @@ def _enable_matplotlib_integration():
150
ip = get_ipython()
151
backend = get_backend()
152
if ip and backend == 'module://%s' % __name__:
153
- from IPython.core.pylabtools import configure_inline_support
+ from IPython.core.pylabtools import configure_inline_support, activate_matplotlib
154
try:
155
+ activate_matplotlib(backend)
156
configure_inline_support(ip, backend)
- except ImportError:
157
+ except (ImportError, AttributeError):
158
# bugs may cause a circular import on Python 2
159
def configure_once(*args):
160
161
162
ip.events.unregister('post_run_cell', configure_once)
163
ip.events.register('post_run_cell', configure_once)
0 commit comments