MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / rc_file

Function rc_file

lib/matplotlib/__init__.py:1132–1156  ·  view source on GitHub ↗

Update `.rcParams` from file. Style-blacklisted `.rcParams` (defined in ``matplotlib.style.core.STYLE_BLACKLIST``) are not updated. Parameters ---------- fname : str or path-like A file with Matplotlib rc settings. use_default_template : bool If True,

(fname, *, use_default_template=True)

Source from the content-addressed store, hash-verified

1130
1131
1132def rc_file(fname, *, use_default_template=True):
1133 """
1134 Update `.rcParams` from file.
1135
1136 Style-blacklisted `.rcParams` (defined in
1137 ``matplotlib.style.core.STYLE_BLACKLIST``) are not updated.
1138
1139 Parameters
1140 ----------
1141 fname : str or path-like
1142 A file with Matplotlib rc settings.
1143
1144 use_default_template : bool
1145 If True, initialize with default parameters before updating with those
1146 in the given file. If False, the current configuration persists
1147 and only the parameters specified in the file are updated.
1148 """
1149 # Deprecation warnings were already handled in rc_params_from_file, no need
1150 # to reemit them here.
1151 with _api.suppress_matplotlib_deprecation_warning():
1152 from .style.core import STYLE_BLACKLIST
1153 rc_from_file = rc_params_from_file(
1154 fname, use_default_template=use_default_template)
1155 rcParams.update({k: rc_from_file[k] for k in rc_from_file
1156 if k not in STYLE_BLACKLIST})
1157
1158
1159@contextlib.contextmanager

Callers 1

rc_contextFunction · 0.85

Calls 2

rc_params_from_fileFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…