Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 968c10c

Browse files
committed
Make matplotlib.style.available sorted alphabetically.
1 parent 8d3e817 commit 968c10c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/style/core.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ def use(style):
8383
| list | A list of style specifiers (str or dict) applied from first |
8484
| | to last in the list. |
8585
+------+-------------------------------------------------------------+
86-
87-
8886
"""
8987
style_alias = {'mpl20': 'default',
9088
'mpl15': 'classic'}
@@ -218,5 +216,8 @@ def update_nested_dict(main_dict, new_dict):
218216
def reload_library():
219217
"""Reload style library."""
220218
global library
221-
available[:] = library = update_user_library(_base_library)
219+
library = update_user_library(_base_library)
220+
available[:] = sorted(library.keys())
221+
222+
222223
reload_library()

0 commit comments

Comments
 (0)