8000 Make matplotlib.style.available sorted alphabetically. by bingyao · Pull Request #14908 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Make matplotlib.style.available sorted alphabetically. #14908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2019

Conversation

bingyao
Copy link
Contributor
@bingyao bingyao commented Jul 28, 2019

PR Summary

Before:

>>> mpl.style.available
['seaborn-dark',
 'seaborn-darkgrid',
 'seaborn-ticks',
 'fivethirtyeight',
 'seaborn-whitegrid',
 'classic',
 '_classic_test',
 'fast',
 'seaborn-talk',
 'seaborn-dark-palette',
 'seaborn-bright',
 'seaborn-pastel',
 'grayscale',
 'seaborn-notebook',
 'ggplot',
 'seaborn-colorblind',
 'seaborn-muted',
 'seaborn',
 'Solarize_Light2',
 'seaborn-paper',
 'bmh',
 'tableau-colorblind10',
 'seaborn-white',
 'dark_background',
 'seaborn-poster',
 'seaborn-deep']

After:

>>> mpl.style.available
['Solarize_Light2',
 '_classic_test',
 'bmh',
 'classic',
 'dark_background',
 'fast',
 'fivethirtyeight',
 'ggplot',
 'grayscale',
 'seaborn',
 'seaborn-bright',
 'seaborn-colorblind',
 'seaborn-dark',
 'seaborn-dark-palette',
 'seaborn-darkgrid',
 'seaborn-deep',
 'seaborn-muted',
 'seaborn-notebook',
 'seaborn-paper',
 'seaborn-pastel',
 'seaborn-poster',
 'seaborn-talk',
 'seaborn-ticks',
 'seaborn-white',
 'seaborn-whitegrid',
 'tableau-colorblind10']

8000
@tacaswell tacaswell added this to the v3.2.0 milestone Jul 28, 2019
@tacaswell
Copy link
Member

Pro: this makes it much more readable
Con: users slicing into this will be broken

I think this should get a not in API changes, but overall 👍

@anntzer
Copy link
Contributor
anntzer commented Jul 28, 2019

the order was not constant before (it's whatever os.listdir returns, which comes from the filesystem) so I don't think anyone could really have been relying on slicing.

@tacaswell tacaswell closed this Jul 29, 2019
@tacaswell tacaswell reopened this Jul 29, 2019
@tacaswell
Copy link
Member

power-cycled to re-run CI.

@anntzer anntzer merged commit 3fb246c into matplotlib:master Jul 30, 2019
@bingyao bingyao deleted the sorted_available_styles branch July 30, 2019 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0