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 @@ -1088,19 +1088,31 @@ def rc_file_defaults():
1088
1088
if k not in STYLE_BLACKLIST })
1089
1089
1090
1090
1091
- def rc_file (fname ):
1091
+ def rc_file (fname , * , use_default_template = True ):
1092
1092
"""
1093
1093
Update rc params from file.
1094
1094
1095
1095
Style-blacklisted rc params (defined in
1096
1096
`matplotlib.style.core.STYLE_BLACKLIST`) are not updated.
1097
+
1098
+ Parameters
1099
+ ----------
1100
+ fname : str
1101
+ Name of file parsed for matplotlib settings.
1102
+
1103
+ use_default_template : bool
1104
+ If True, initialize with default parameters before updating with those
1105
+ in the given file. If False, the current configuration persists
1106
+ and only the parameters specified in the file are updated.
1107
+
1097
1108
"""
1098
1109
# Deprecation warnings were already handled in rc_params_from_file, no need
1099
1110
# to reemit them here.
1100
1111
with warnings .catch_warnings ():
1101
1112
warnings .simplefilter ("ignore" , mplDeprecation )
1102
1113
from .style .core import STYLE_BLACKLIST
1103
- rc_from_file = rc_params_from_file (fname )
1114
+ rc_from_file = rc_params_from_file (
1115
+ fname , use_default_template = use_default_template )
1104
1116
rcParams .update ({k : rc_from_file [k ] for k in rc_from_file
1105
1117
if k not in STYLE_BLACKLIST })
1106
1118
You can’t perform that action at this time.
0 commit comments