File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -1214,19 +1214,31 @@ def rc_file_defaults():
1214
1214
if k not in STYLE_BLACKLIST })
1215
1215
1216
1216
1217
- def rc_file (fname ):
1217
+ def rc_file (fname , * , use_default_template = True ):
1218
1218
"""
1219
1219
Update rc params from file.
1220
1220
1221
1221
Style-blacklisted rc params (defined in
1222
1222
`matplotlib.style.core.STYLE_BLACKLIST`) are not updated.
1223
+
1224
+ Parameters
1225
+ ----------
1226
+ fname : str
1227
+ Name of file parsed for matplotlib settings.
1228
+
1229
+ use_default_template : bool
1230
+ If True, initialize with default parameters before updating with those
1231
+ in the given file. If False, the current configuration persists
1232
+ and only the parameters specified in the file are updated.
1233
+
1223
1234
"""
1224
1235
# Deprecation warnings were already handled in rc_params_from_file, no need
1225
1236
# to reemit them here.
1226
1237
with warnings .catch_warnings ():
1227
1238
warnings .simplefilter ("ignore" , mplDeprecation )
1228
1239
from .style .core import STYLE_BLACKLIST
1229
- rc_from_file = rc_params_from_file (fname )
1240
+ rc_from_file = rc_params_from_file (
1241
+ fname , use_default_template = use_default_template )
1230
1242
rcParams .update ({k : rc_from_file [k ] for k in rc_from_file
1231
1243
if k not in STYLE_BLACKLIST })
1232
1244
You can’t perform that action at this time.
0 commit comments