Skip to content

Commit

Permalink
Do not enable default Matplotlib backend when checking what the backe…
Browse files Browse the repository at this point in the history
…nd is
  • Loading branch information
ianthomas23 committed Oct 17, 2024
1 parent 90034cf commit 3e22c27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions matplotlib_inline/backend_inline.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ def configure_inline_support(shell, backend):

def _enable_matplotlib_integration():
"""Enable extra IPython matplotlib integration when we are loaded as the matplotlib backend."""
from matplotlib import get_backend
from matplotlib import rcParams
ip = get_ipython()
backend = get_backend()
backend = rcParams._get("backend")
if ip and backend in ('inline', 'module://matplotlib_inline.backend_inline'):
from IPython.core.pylabtools import activate_matplotlib
try:
Expand Down

0 comments on commit 3e22c27

Please sign in to comment.