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 75cc617

Browse filesBrowse files
tacaswellanntzer
authored andcommitted
MNT: special case 'backend' in rc_file
1 parent 2c1f52c commit 75cc617
Copy full SHA for 75cc617

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+7
-2
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,8 +1245,13 @@ def rc_file(fname):
12451245
with warnings.catch_warnings():
12461246
warnings.simplefilter("ignore", mplDeprecation)
12471247
from .style.core import STYLE_BLACKLIST
1248-
rcParams.update({k: v for k, v in rc_params_from_file(fname).items()
1249-
if k not in STYLE_BLACKLIST})
1248+
rc_from_file = rc_params_from_file(fname)
1249+
rcParams.update({k: rc_from_file[k] for k in rc_from_file
1250+
if k not in STYLE_BLACKLIST and k != 'backend'})
1251+
1252+
proposed_backend = dict.__getitem__(rc_from_file, 'backend')
1253+
if (proposed_backend is not rcsetup._auto_backend_sentinel):
1254+
rcParams['backend'] = proposed_backend
12501255

12511256

12521257
class rc_context:

0 commit comments

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