8000 Backport PR #17252: Fix bug where matplotlib.style('default') resets … · meeseeksmachine/matplotlib@de281fe · GitHub
[go: up one dir, main page]

Skip to content

Commit de281fe

Browse files
QuLogicmeeseeksmachine
authored andcommitted
Backport PR matplotlib#17252: Fix bug where matplotlib.style('default') resets the backend
1 parent 2655bba commit de281fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/style/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343

4444
def _remove_blacklisted_style_params(d, warn=True):
4545
o = {}
46-
for key, val in d.items():
46+
for key in d: # prevent triggering RcParams.__getitem__('backend')
4747
if key in STYLE_BLACKLIST:
4848
if warn:
4949
cbook._warn_external(
5050
"Style includes a parameter, '{0}', that is not related "
5151
"to style. Ignoring".format(key))
5252
else:
53-
o[key] = val
53+
o[key] = d[key]
5454
return o
5555

5656

0 commit comments

Comments
 (0)
0