Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce04937

Browse files
tacaswellanntzer
authored andcommitted
API: Do not have rc_file_defaults import resolve backends
In either case (resolved or not) pass the backend value through. This maintains the behavior prior to changing the type of rcParamsOrig to RcParams.
1 parent 1e8788d commit ce04937

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,8 +1224,9 @@ def rc_file_defaults():
12241224
with warnings.catch_warnings():
12251225
warnings.simplefilter("ignore", mplDeprecation)
12261226
from .style.core import STYLE_BLACKLIST
1227-
rcParams.update({k: v for k, v in rcParamsOrig.items()
1228-
if k not in STYLE_BLACKLIST})
1227+
rcParams.update({k: rcParamsOrig[k] for k in rcParamsOrig
1228+
if k not in STYLE_BLACKLIST and k != 'backend'})
1229+
rcParams['backend'] = dict.__getitem__(rcParamsOrig, 'backend')
12291230

12301231

12311232
def rc_file(fname):

0 commit comments

Comments
 (0)