We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cea7f28 commit c2347d1Copy full SHA for c2347d1
examples/style_sheets/style_sheets_reference.py
@@ -134,8 +134,17 @@ def plot_figure(style_label=None):
134
135
if __name__ == "__main__":
136
137
+ # Setup a list of all available styles, in alphabetical order but
138
+ # the `default` and `classic` ones, which will be forced resp. in
139
+ # first and second position.
140
+ style_list = list(plt.style.available) # *new* list: avoids side effects.
141
+ style_list.remove('classic') # `classic` is in the list: first remove it.
142
+ style_list.sort()
143
+ style_list.insert(0, u'default')
144
+ style_list.insert(1, u'classic')
145
+
146
# Plot a demonstration figure for every available style sheet.
- for style_label in plt.style.available:
147
+ for style_label in style_list:
148
with plt.style.context(style_label):
149
fig = plot_figure(style_label=style_label)
150
0 commit comments