Skip to content

Commit 3c00cc2

Browse files
committed
Exclude internal styles from style sheet reference
Also make the style name a bit larger and bold so that it's easier to read.
1 parent fc4f0cc commit 3c00cc2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/style_sheets/style_sheets_reference.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def plot_figure(style_label=""):
112112

113113
fig, axs = plt.subplots(ncols=6, nrows=1, num=style_label,
114114
figsize=fig_size, squeeze=True)
115-
axs[0].set_ylabel(style_label)
115+
axs[0].set_ylabel(style_label, fontsize=13, fontweight='bold')
116116

117117
plot_scatter(axs[0], prng)
118118
plot_image_and_patch(axs[1], prng)
@@ -131,8 +131,11 @@ def plot_figure(style_label=""):
131131
# Setup a list of all available styles, in alphabetical order but
132132
# the `default` and `classic` ones, which will be forced resp. in
133133
# first and second position.
134+
# styles with leading underscores are for internal use such as testing
135+
# and plot types gallery. These are excluded here.
134136
style_list = ['default', 'classic'] + sorted(
135-
style for style in plt.style.available if style != 'classic')
137+
style for style in plt.style.available
138+
if style != 'classic' and not style.startswith('_'))
136139

137140
# Plot a demonstration figure for every available style sheet.
138141
for style_label in style_list:

0 commit comments

Comments
 (0)