Skip to content

Sort examples by title, not by filename. - #14953

Closed
anntzer wants to merge 1 commit into
matplotlib:masterfrom
anntzer:sortorder
Closed

anntzer wants to merge 1 commit into
matplotlib:masterfrom
anntzer:sortorder

Conversation

@anntzer

@anntzer anntzer commented Aug 1, 2019

Copy link
Copy Markdown
Contributor

Sorting by filename results in a gallery nearly ordered by title, but
not really (because most title names are directly derived from the
filename, with some exceptions), which is slightly jarring.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Sorting by filename results in a gallery nearly ordered by title, but
not really (because most title names are directly derived from the
filename, with some exceptions), which is slightly jarring.
@jklymak

jklymak commented Aug 1, 2019

Copy link
Copy Markdown
Member

Yeah the only problem w this is we can’t control the order of tutorials?

@anntzer

anntzer commented Aug 1, 2019

Copy link
Copy Markdown
Contributor Author

Aren't they still sorted by the explicit_subsection_order?

@ImportanceOfBeingErnest

Copy link
Copy Markdown
Member

If I remember correctly I did think about this in #11257 but decided for filenames instead of titles, because filenames are actually more likely to give the desired order.

E.g.

filename title
bar_stacked.py Stacked Bar Graph
barchart.py Grouped bar chart with labels
barh.py Horizontal bar chart

@anntzer

anntzer commented Aug 1, 2019

Copy link
Copy Markdown
Contributor Author

I guess this basically depends on to what extent the examples have good filenames vs. sortable titles... The problem with filenames is that we can't even change them (link rot etc.) whereas we can at least try to reword the titles to make them sortable.

In any case I'm not extremely attached to the proposal here either.

@ImportanceOfBeingErnest

Copy link
Copy Markdown
Member

That's what the list_all is for; if someone feels strongly about a certain order they can fill in that list. Or we could create a good-first-issue to invite someone to do it for all examples.

@tacaswell tacaswell added this to the v3.3.0 milestone Aug 12, 2019
@NelleV

NelleV commented Sep 5, 2019

Copy link
Copy Markdown
Member

It is also easier to change the filenames to match the wished order than to find good title names that also preserve the order we want. I'm 👎 on that one.

@NelleV NelleV added the status: needs comment/discussion needs consensus on next step label Sep 5, 2019
@anntzer

anntzer commented Sep 5, 2019

Copy link
Copy Markdown
Contributor Author

I'm not particularly attached to this PR, was just a suggestion.

@anntzer anntzer closed this Sep 5, 2019
@anntzer
anntzer deleted the sortorder branch September 5, 2019 10:19
@tacaswell tacaswell modified the milestones: v3.3.0, unassigned Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants