File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -1220,21 +1220,33 @@ def rcdefaults():
1220
1220
Use a specific style file. Call ``style.use('default')`` to restore
1221
1221
the default style.
1222
1222
"""
1223
- rcParams .clear ()
1224
- rcParams .update (rcParamsDefault )
1223
+ # Deprecation warnings were already handled when creating rcParamsDefault,
1224
+ # no need to reemit them here.
1225
+ with warnings .catch_warnings ():
1226
+ warnings .simplefilter ("ignore" , mplDeprecation )
1227
+ rcParams .clear ()
1228
+ rcParams .update (rcParamsDefault )
1225
1229
1226
1230
1227
1231
def rc_file_defaults ():
1228
1232
"""Restore the rc params from the original rc file loaded by Matplotlib.
1229
1233
"""
1230
- rcParams .update (rcParamsOrig )
1234
+ # Deprecation warnings were already handled when creating rcParamsOrig, no
1235
+ # need to reemit them here.
1236
+ with warnings .catch_warnings ():
1237
+ warnings .simplefilter ("ignore" , mplDeprecation )
1238
+ rcParams .update (rcParamsOrig )
1231
1239
1232
1240
1233
1241
def rc_file (fname ):
1234
1242
"""
1235
1243
Update rc params from file.
1236
1244
"""
1237
- rcParams .update (rc_params_from_file (fname ))
1245
+ # Deprecation warnings were already handled in rc_params_from_file, no need
1246
+ # to reemit them here.
1247
+ with warnings .catch_warnings ():
1248
+ warnings .simplefilter ("ignore" , mplDeprecation )
1249
+ rcParams .update (rc_params_from_file (fname ))
1238
1250
1239
1251
1240
1252
class rc_context :
You can’t perform that action at this time.
0 commit comments