@@ -1205,7 +1205,11 @@ def rc(group, **kwargs):
1205
1205
1206
1206
1207
1207
def rcdefaults ():
1208
- """Restore the rc params from Matplotlib's internal defaults.
1208
+ """
1209
+ Restore the rc params from Matplotlib's internal default style.
1210
+
1211
+ Style-blacklisted rc params (defined in
1212
+ `matplotlib.style.core.STYLE_BLACKLIST`) are not updated.
1209
1213
1210
1214
See Also
1211
1215
--------
@@ -1219,29 +1223,42 @@ def rcdefaults():
1219
1223
# no need to reemit them here.
1220
1224
with warnings .catch_warnings ():
1221
1225
warnings .simplefilter ("ignore" , mplDeprecation )
1226
+ from .style .core import STYLE_BLACKLIST
1222
1227
rcParams .clear ()
1223
- rcParams .update (rcParamsDefault )
1228
+ rcParams .update ({k : v for k , v in rcParamsDefault .items ()
1229
+ if k not in STYLE_BLACKLIST })
1224
1230
1225
1231
1226
1232
def rc_file_defaults ():
1227
- """Restore the rc params from the original rc file loaded by Matplotlib.
1233
+ """
1234
+ Restore the rc params from the original rc file loaded by Matplotlib.
1235
+
1236
+ Style-blacklisted rc params (defined in
1237
+ `matplotlib.style.core.STYLE_BLACKLIST`) are not updated.
1228
1238
"""
1229
1239
# Deprecation warnings were already handled when creating rcParamsOrig, no
1230
1240
# need to reemit them here.
1231
1241
with warnings .catch_warnings ():
1232
1242
warnings .simplefilter ("ignore" , mplDeprecation )
1233
- rcParams .update (rcParamsOrig )
1243
+ from .style .core import STYLE_BLACKLIST
1244
+ rcParams .update ({k : v for k , v in rcParamsOrig .items ()
1245
+ if k not in STYLE_BLACKLIST })
1234
1246
1235
1247
1236
1248
def rc_file (fname ):
1237
1249
"""
1238
1250
Update rc params from file.
1251
+
1252
+ Style-blacklisted rc params (defined in
1253
+ `matplotlib.style.core.STYLE_BLACKLIST`) are not updated.
1239
1254
"""
1240
1255
# Deprecation warnings were already handled in rc_params_from_file, no need
1241
1256
# to reemit them here.
1242
1257
with warnings .catch_warnings ():
1243
1258
warnings .simplefilter ("ignore" , mplDeprecation )
1244
- rcParams .update (rc_params_from_file (fname ))
1259
+ from .style .core import STYLE_BLACKLIST
1260
+ rcParams .update ({k : v for k , v in rc_params_from_file (fname ).items ()
1261
+ if k not in STYLE_BLACKLIST })
1245
1262
1246
1263
1247
1264
class rc_context :
0 commit comments