Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fabcc80

Browse files
authored
Merge pull request #18032 from meeseeksmachine/auto-backport-of-pr-18026-on-v3.3.x
Backport PR #18026 on branch v3.3.x (FIX: Be sure matplotlib.backends is imported before we use it)
2 parents be26359 + 25fe49a commit fabcc80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/pyplot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ def switch_backend(newbackend):
227227
The name of the backend to use.
228228
"""
229229
global _backend_mod
230-
230+
# make sure the init is pulled up so we can assign to it later
231+
import matplotlib.backends
231232
close("all")
232233

233234
if newbackend is rcsetup._auto_backend_sentinel:

0 commit comments

Comments
 (0)