Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 68652b1

Browse filesBrowse files
authored
Merge pull request #17252 from lukelbd/bugfix_default-style-backend
Fix bug where matplotlib.style('default') resets the backend
2 parents 6ec39d5 + 23470a8 commit 68652b1
Copy full SHA for 68652b1

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎lib/matplotlib/style/core.py

Copy file name to clipboardExpand all lines: lib/matplotlib/style/core.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@
4444

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

5757

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.