@@ -91,27 +91,31 @@ def use(style):
91
91
----------
92
92
style : str, dict, Path or list
93
93
94
- A style specification.
94
+ A style specification. Valid options are:
95
95
96
- - If a str, this can be one of the style names in `.style.available`
97
- (a builtin style or a style installed in the user library path).
96
+ str
97
+ - One of the style names in `.style.available` (a builtin style or
98
+ a style installed in the user library path).
98
99
99
- This can also be a dotted name of the form "package.style_name"; in
100
- that case, "package" should be an importable Python package name,
101
- e.g. at ``/path/to/package/__init__.py``; the loaded style file is
102
- ``/path/to/package/style_name.mplstyle``. (Style files in
103
- subpackages are likewise supported.)
100
+ - A dotted name of the form "package.style_name"; in that case,
101
+ "package" should be an importable Python package name, e.g. at
102
+ ``/path/to/package/__init__.py``; the loaded style file is
103
+ ``/path/to/package/style_name.mplstyle``. (Style files in
104
+ subpackages are likewise supported.)
104
105
105
- This can also be the path or URL to a style file, which gets loaded
106
- by `.rc_params_from_file`.
106
+ - The path or URL to a style file, which gets loaded by
107
+ `.rc_params_from_file`.
107
108
108
- - If a dict, this is a mapping of key/value pairs for `.rcParams`.
109
+ dict
110
+ A mapping of key/value pairs for `matplotlib.rcParams`.
109
111
110
- - If a Path, this is the path to a style file, which gets loaded by
111
- `.rc_params_from_file`.
112
+ Path
113
+ The path to a style file, which gets loaded by
114
+ `.rc_params_from_file`.
112
115
113
- - If a list, this is a list of style specifiers (str, Path or dict),
114
- which get applied from first to last in the list.
116
+ list
117
+ A list of style specifiers (str, Path or dict), which are applied
118
+ from first to last in the list.
115
119
116
120
Notes
117
121
-----
@@ -187,15 +191,27 @@ def context(style, after_reset=False):
187
191
A style specification. Valid options are:
188
192
189
193
str
190
- The name of a style or a path/URL to a style file. For a list of
191
- available style names, see `.style.available`.
194
+ - One of the style names in `.style.available` (a builtin style or
195
+ a style installed in the user library path).
196
+
197
+ - A dotted name of the form "package.style_name"; in that case,
198
+ "package" should be an importable Python package name, e.g. at
199
+ ``/path/to/package/__init__.py``; the loaded style file is
200
+ ``/path/to/package/style_name.mplstyle``. (Style files in
201
+ subpackages are likewise supported.)
202
+
203
+ - The path or URL to a style file, which gets loaded by
204
+ `.rc_params_from_file`.
192
205
dict
193
- Dictionary with valid key/value pairs for `matplotlib.rcParams`.
206
+ A mapping of key/value pairs for `matplotlib.rcParams`.
207
+
194
208
Path
195
- A path-like object which is a path to a style file.
209
+ The path to a style file, which gets loaded by
210
+ `.rc_params_from_file`.
211
+
196
212
list
197
- A list of style specifiers (str, Path or dict) applied from first
198
- to last in the list.
213
+ A list of style specifiers (str, Path or dict), which are applied
214
+ from first to last in the list.
199
215
200
216
after_reset : bool
201
217
If True, apply style after resetting settings to their defaults;
0 commit comments