Skip to content

Backport PR #17252 on branch v3.2.x (Fix bug where matplotlib.style('default') resets the backend) #17254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/matplotlib/style/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@

def _remove_blacklisted_style_params(d, warn=True):
o = {}
for key, val in d.items():
for key in d: # prevent triggering RcParams.__getitem__('backend')
if key in STYLE_BLACKLIST:
if warn:
cbook._warn_external(
"Style includes a parameter, '{0}', that is not related "
"to style. Ignoring".format(key))
else:
o[key] = val
o[key] = d[key]
return o


Expand Down