We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56ef444 commit d7df790Copy full SHA for d7df790
matplotlib_inline/backend_inline.py
@@ -208,9 +208,14 @@ def configure_inline_support(shell, backend):
208
209
def _enable_matplotlib_integration():
210
"""Enable extra IPython matplotlib integration when we are loaded as the matplotlib backend."""
211
- from matplotlib import rcParams
212
ip = get_ipython()
213
- backend = rcParams._get("backend")
+
+ import matplotlib
214
+ if matplotlib.__version_info__ >= (3, 10):
215
+ backend = matplotlib.get_backend(auto_select=False)
216
+ else:
217
+ backend = matplotlib.rcParams._get("backend")
218
219
if ip and backend in ('inline', 'module://matplotlib_inline.backend_inline'):
220
from IPython.core.pylabtools import activate_matplotlib
221
try:
0 commit comments