|
6 | 6 | import matplotlib.pyplot as plt |
7 | 7 |
|
8 | 8 | from fooof.plts.settings import (AXIS_STYLE_ARGS, LINE_STYLE_ARGS, COLLECTION_STYLE_ARGS, |
9 | | - STYLE_ARGS, LABEL_SIZE, LEGEND_SIZE, LEGEND_LOC, |
10 | | - TICK_LABELSIZE, TITLE_FONTSIZE) |
| 9 | + CUSTOM_STYLE_ARGS, STYLE_ARGS, TICK_LABELSIZE, TITLE_FONTSIZE, |
| 10 | + LABEL_SIZE, LEGEND_SIZE, LEGEND_LOC) |
11 | 11 |
|
12 | 12 | ################################################################################################### |
13 | 13 | ################################################################################################### |
14 | 14 |
|
| 15 | +def check_style_options(): |
| 16 | + """Check the list of valid style arguments that can be passed into plot functions.""" |
| 17 | + |
| 18 | + print('Valid style arguments:') |
| 19 | + for label, options in zip(['Axis', 'Line', 'Collection', 'Custom'], |
| 20 | + [AXIS_STYLE_ARGS, LINE_STYLE_ARGS, |
| 21 | + COLLECTION_STYLE_ARGS, CUSTOM_STYLE_ARGS]): |
| 22 | + print(' ', label, '\t', ', '.join(options)) |
| 23 | + |
| 24 | + |
15 | 25 | def style_spectrum_plot(ax, log_freqs, log_powers, grid=True): |
16 | 26 | """Apply style and aesthetics to a power spectrum plot. |
17 | 27 |
|
@@ -229,9 +239,19 @@ def style_plot(func, *args, **kwargs): |
229 | 239 | By default, this function applies styling with the `apply_style` function. Custom |
230 | 240 | functions for applying style can be passed in using `apply_style` as a keyword argument. |
231 | 241 |
|
232 | | - The `apply_style` function calls sub-functions for applying style different plot elements, |
233 | | - and these sub-functions can be overridden by passing in alternatives for `axis_styler`, |
234 | | - `line_styler`, and `custom_styler`. |
| 242 | + The `apply_style` function calls sub-functions for applying different plot elements, including: |
| 243 | +
|
| 244 | + - `axis_styler`: apply style options to an axis |
| 245 | + - `line_styler`: applies style options to lines objects in a plot |
| 246 | + - `collection_styler`: applies style options to collections objects in a plot |
| 247 | + - `custom_style`: applies custom style options |
| 248 | +
|
| 249 | + Each of these sub-functions can be overridden by passing in alternatives. |
| 250 | +
|
| 251 | + To see the full set of style arguments that are supported, run the following code: |
| 252 | +
|
| 253 | + >>> from fooof.plts.style import check_style_options |
| 254 | + >>> check_style_options() |
235 | 255 | """ |
236 | 256 |
|
237 | 257 | @wraps(func) |
|
0 commit comments