FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

adding gallery sorting by choldgraf · Pull Request #8975 · matplotlib/matplotlib · GitHub

Repository navigation

adding gallery sorting - #8975

Merged
NelleV merged 3 commits into
matplotlib:masterfrom
choldgraf:examples_order
Aug 4, 2017
Merged

NelleV merged 3 commits into
matplotlib:masterfrom
choldgraf:examples_order

Conversation

Copy link
Copy Markdown
Contributor

Now that sphinx-gallery allows you to choose folder ordering within galleries, this is a PR that attempts to give this a shot. I figured it'd be cumbersome to choose a custom ordering for all of our folders, since really we just wanna make sure that a subset are at the top. So, this PR defines that subset, and then lists all the subsequent folders alphabetically.

This PR does:

  1. Add gallery ordering (with a semi-arbitrary ordering chosen by me...lmk if you think it should be different)
  2. Rename the tutorials folders from e.g., 01_introductory -> introductory since we don't need alphanumeric ordering anymore

Let's see how it looks in circle!

tacaswell added this to the 2.1 (next point release) milestone Aug 1, 2017

QuLogic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks like you might have missed renaming a few cross-references.

Can you also update the dependencies to require sphinx-gallery>=0.1.12, because otherwise the backreferences fail?

Comment thread doc/conf.py Outdated
'../tutorials/introductory',
'../tutorials/intermediate',
'../tutorials/advanced']
for folder in glob('../examples/*') + glob('../tutorials/*'):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

glob is not sorted.

QuLogic mentioned this pull request Aug 3, 2017
6 tasks done

Copy link
Copy Markdown
Contributor Author

ok I think I got all the cross references this time :-)

Comment thread doc/conf.py Outdated
explicit_order_folders = ['../examples/pyplots',
'../examples/statistics',
'../examples/color',
'../examples/pylab_examples',

QuLogic Aug 3, 2017 •
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think this just got removed with #8983 (might have to rebase to see it, though.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

whoah way to go @NelleV ! I didn't know we were so close to moving everything outta that folder. I'll rebase and see if it's gone now.

Comment thread doc/conf.py
'../examples/statistics',
'../examples/color',
'../examples/pylab_examples',
'../examples/showcase',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Showcase should maybe be higher?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

+1 for that...any others you'd like to see reordered?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Actually - I just realized that a better solution here might be to use the viewing data from google analytics to choose the ordering. That might be a kind of self-reinforcing kind of thing, but it's a good first start

Comment thread doc/conf.py
'../examples/color',
'../examples/pylab_examples',
'../examples/showcase',
'../tutorials/introductory',

QuLogic Aug 3, 2017 •
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Where should I be looking to find this? In the gallery page, I don't think I see any tutorials after showcase?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The way SG handles this is there's just one list that defines the order priority. So folders inside of tutorials and examples won't be shown together or anything, this just defines the ordering. You can think of this as two separate lists, one for examples and one for tutorials.

story645 commented Aug 3, 2017

Copy link
Copy Markdown
Member

Happy dance that there's now ordering, but I do wonder if there's some natural clustering of the categories aside from metrics. The list is:

Pyplot Examples
Statistics
Color
Pylab Examples
Showcase
Animation Examples
Matplotlib API
Axes Grid
Axis Artist
Event Handling
Front Page
Images, contours and fields
Lines, bars and markers
Miscellaneous Examples
mplot3d toolkit
Pie and polar charts
Our Favorite Recipes
Scales in Matplotlib
Shapes and collections
Specialty Plots
Style sheets
Subplots, axes and figures
Text, labels and annotations
Ticks and spines
Units in Matplotlib
Embedding matplotlib in graphical user interfaces
Userdemo
Widgets

I expect that some of these are probably are already being collapsed into each other, but I think some limit like n=10 or whatever a usability expert would suggest on categories (there are almost 30 in the list) could help make it all seem less overwhelming?

Copy link
Copy Markdown
Contributor Author

So I am definitely +1 on refactoring the examples (I actually think they should fall into a few sub-categories, since many of those examples aren't going to be of interest to non-dev users). But - that'll be complicated and will do things like breaking hard-links, so I'd prefer if we kept this PR focused on picking and implementing an order. WDYT?

story645 commented Aug 3, 2017 •
edited
Loading

Copy link
Copy Markdown
Member

I totally agree it's out scope for this PR, it just seems like the sort of thing someone is already working on concurrently and so figured I'd throw it out there.

As a first pass on ordering, I'm thinking roughly the following clusters:

Pyplot Examples (while this is most searched for, I debate promoting it to top since this isn't the recommended style)

Pylab Examples (though this is gone now?)
Statistics
Specialty Plots

Front Page
Showcase
Our Favorite Recipes
Miscellaneous Examples

Matplotlib API (though should maybe be moved right under/above pyplot examples)
Axes Grid
Axis Artist
Color
Images, contours and fields
Lines, bars and markers
Pie and polar charts
Shapes and collections
Scales in Matplotlib
Subplots, axes and figures
Style sheets
Text, labels and annotations
Ticks and spines
Units in Matplotlib
mplot3d toolkit

Animation Examples
Event Handling
Embedding matplotlib in graphical user interfaces
Widgets
Userdemo

WeatherGod commented Aug 3, 2017 via email

Copy link
Copy Markdown
Member

story645 commented Aug 3, 2017

Copy link
Copy Markdown
Member

Totally a mishmash. I just grabbed all the categories that just seem to be about displaying cool plots rather than showing off specific parts of the API 'cause they didn't seem to fit in anywhere else. I totally think they should be renamed and consolidated further.

Copy link
Copy Markdown
Contributor Author

Just to re-iterate, this PR isn't about renaming or combining example folders...just agreeing on an initial ordering, though I think it's a good idea to open a subsequent PR about combining etc. I think if that's a direction people are friendly to, it should happen before 2.1 is released, because this will break a lot of links.

to @story645's ordering, I think this is a good start! Agree we should shuffle things around a little bit. @WeatherGod do you have specific changes to the order that make more sense to you?

choldgraf commented Aug 3, 2017 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

Here's a quick plot of the top ~20 folders inside of examples. I think we should assume pylab will be split up (which is a great idea IMO).

dstansby commented Aug 3, 2017

Copy link
Copy Markdown
Member

@choldgraf pylab_examples is no more in the master branch

Copy link
Copy Markdown
Contributor Author

ok latest push no longer has pylab examples!

WeatherGod commented Aug 4, 2017 via email

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member

👍 to getting the sorting in at all and defer bikeshedding of names, organization, etc to later work.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL