Skip to content

Commit ec2e832

Browse files
committed
Don't sort boxstyles/arrowstyles/etc. alphabetically.
We now have source order, which should be more semantically more meaningful.
1 parent 450cdc6 commit ec2e832

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/shapes_and_collections/fancybox_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
fig = plt.figure(figsize=(4 / 1.5, figheight / 1.5))
2222
fontsize = 0.3 * 72
2323

24-
for i, stylename in enumerate(sorted(styles)):
24+
for i, stylename in enumerate(styles):
2525
fig.text(0.5, (spacing * (len(styles) - i) - 0.5) / figheight, stylename,
2626
ha="center",
2727
size=fontsize,

lib/matplotlib/patches.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,7 +2138,7 @@ def _simpleprint_styles(_styles):
21382138
{stylename: styleclass}, return a string rep of the list of keys.
21392139
Used to update the documentation.
21402140
"""
2141-
return "[{}]".format("|".join(map(" '{}' ".format, sorted(_styles))))
2141+
return "[{}]".format("|".join(map(" '{}' ".format, _styles)))
21422142

21432143

21442144
class _Style:
@@ -2184,7 +2184,7 @@ def pprint_styles(cls):
21842184
f'``{name}``',
21852185
# [1:-1] drops the surrounding parentheses.
21862186
str(inspect.signature(cls))[1:-1] or 'None')
2187-
for name, cls in sorted(cls._style_list.items())]]
2187+
for name, cls in cls._style_list.items()]]
21882188
# Convert to rst table.
21892189
col_len = [max(len(cell) for cell in column) for column in zip(*table)]
21902190
table_formatstr = ' '.join('=' * cl for cl in col_len)

0 commit comments

Comments
 (0)