We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c1f52c commit 75cc617Copy full SHA for 75cc617
lib/matplotlib/__init__.py
@@ -1245,8 +1245,13 @@ def rc_file(fname):
1245
with warnings.catch_warnings():
1246
warnings.simplefilter("ignore", mplDeprecation)
1247
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})
+ rc_from_file = rc_params_from_file(fname)
+ 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
1255
1256
1257
class rc_context:
0 commit comments