We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce48a65 commit 3eeb476Copy full SHA for 3eeb476
lib/matplotlib/pyplot.py
@@ -247,8 +247,7 @@ def switch_backend(newbackend):
247
# Need to keep a global reference to the backend for compatibility reasons.
248
# See https://github.com/matplotlib/matplotlib/issues/6092
249
matplotlib.backends.backend = newbackend
250
- if not (isinstance(old_backend, str) and
251
- old_backend.lower() == newbackend.lower()):
+ if not cbook._str_equal(old_backend, newbackend):
252
close("all")
253
254
0 commit comments