Skip to content

Commit 235e352

Browse files
ianthomas23Carreau
authored andcommitted
Do not enable default Matplotlib backend when checking what the backend is
1 parent 90034cf commit 235e352

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

matplotlib_inline/backend_inline.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ def configure_inline_support(shell, backend):
208208

209209
def _enable_matplotlib_integration():
210210
"""Enable extra IPython matplotlib integration when we are loaded as the matplotlib backend."""
211-
from matplotlib import get_backend
211+
from matplotlib import rcParams
212212
ip = get_ipython()
213-
backend = get_backend()
213+
backend = rcParams._get("backend")
214214
if ip and backend in ('inline', 'module://matplotlib_inline.backend_inline'):
215215
from IPython.core.pylabtools import activate_matplotlib
216216
try:

0 commit comments

Comments
 (0)