Skip to content

Add tutorials #8545

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 9 commits into from
Apr 30, 2017
Merged

Add tutorials #8545

merged 9 commits into from
Apr 30, 2017

Conversation

choldgraf
Copy link
Contributor

@choldgraf choldgraf commented Apr 28, 2017

This PR moves around a few of the users documentation section so that multiple sections now fall under a newly-created tutorials folder. This can be a place for more in-depth guides etc, and should make it easier for people to find information in the documentation. No new content has been created for the most part, it's mostly just converting the user guide materials into something suitable for sphinx-gallery, so lots of manual labor but nothing mind-blowingly new. Still sort of a WIP though comments are welcome.

New tutorials page can be found here: http://predictablynoisy.com/matplotlib/tutorials/index.html

@story645
Copy link
Member

Can you do something like 01Intro to force ordering here? I think it'll just majorly confuse users if they see advanced before intro.

@choldgraf
Copy link
Contributor Author

yeah that's a good point @story645! The latest push has the ordering correct. It turns out that if you number the folders, they show up only in the URLs and not in the section headers, which is pretty cool!

This also consolidated some of the colormap examples into a colormap tutorial, which you can see here:

http://predictablynoisy.com/matplotlib/tutorials/colors/colormaps.html

@story645
Copy link
Member

story645 commented Apr 28, 2017

Yay! Also now gonna ask for some sort of ordering so that pyplot and a simple OO tutorial (if there is one...I think the usage faq may also work...)come before customizing?

@anntzer
Copy link
Contributor

anntzer commented Apr 28, 2017

There's something weird going on with s-g (that i had noticed on my side some time ago). If you look at your build, the background of the "customizing matplotlib" entry is black instead of white. This seems to occur every once in a while (though not consistently), someone should probably check what's happening.

@choldgraf
Copy link
Contributor Author

@story645 that one is actually harder to accomplish, but I think will be fixed eventually. see sphinx-gallery/sphinx-gallery#37

Basically sphinx gallery orders the examples w/in a folder by the number of lines of code. There's debate about the right way to handle this in that issue but I don't think we can do custom ordering for now. My solution was to use more folders w/ fewer examples so it doesn't get too cluttered.

@anntzer I believe that's intentional. That code block demos the use of one-off rcparams and it uses dark-background:

with plt.style.context((‘dark_background’)):
    plt.plot(np.sin(np.linspace(0, 2 * np.pi)), ‘r-o’)

@story645
Copy link
Member

:/ Then what about moving the gridspec and tight tutorials down to intermediate since the other module level tutorials are in that section?

@choldgraf
Copy link
Contributor Author

@story645 this is fine with me...I think that gridspec is definitely not introductory material anyway. tight-layout I'm on the fence with but I think it's fine if it's in intermediate. new push coming.

@story645
Copy link
Member

I'm on the fence w/ tight layout too, so don't really mind if it ends up in whichever section ends up aesthetically making more sense.

@choldgraf
Copy link
Contributor Author

@story645 see latest version in push and updated on my website. See new usage guide here!

http://predictablynoisy.com/matplotlib/tutorials/01_introductory/usage.html

@story645
Copy link
Member

😄 Thanks for going on the doc binge! This is so awesome!

@choldgraf
Copy link
Contributor Author

@story645 the docs are gonna be so much better! :)

@choldgraf
Copy link
Contributor Author

looks like tests are passing... and other changes you can think of for this PR @story645 ?

Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

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

also not in code you changed, but since you're
touching it already: These tutorials cover advanced topics for experienced Matplotlib
users and developers.

@@ -7,3 +7,5 @@ Gallery

This gallery contains examples of the many things you can do with
Matplotlib. Click on any image to see the full image and source code.

See the sidebar to the right for a list of topics covered.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need this sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just added it in there because it took me like 2-3 weeks to realize that there was a sidebar w/ TOC haha. I can remove it if you think it's clear enough

@story645
Copy link
Member

This is probably more of an open discussion type thing, but I wonder if external resources should go at the bottom of this page or even just get linked to from the top of this page.

@choldgraf
Copy link
Contributor Author

@story645 for your comment about "advanced users" etc, do you mean to add that in the README.txt file for the advanced folder?

and regarding the external resources - my thinking is that we should move everything that is tutorial-style into the tutorials folder, and thus the user guide page will be a lot easier to parse because there will be fewer items in it. We should def. link to the user guide page from the tutorials and examples page though.

@choldgraf
Copy link
Contributor Author

@story645 latest push has links to some other relevant parts of the documentation at the top of both the examples / tutorials. I think that was a good idea to make things more interconnected.

@choldgraf
Copy link
Contributor Author

image

@choldgraf
Copy link
Contributor Author

(it's ImageComparisonFailure) ;-)

@story645
Copy link
Member

I think I realized why we don't notice the sidebar! Traditionally it's on the left, so that's where we're all trained to look.

Yup, meant edit the READEME in advanced.

@choldgraf
Copy link
Contributor Author

choldgraf commented Apr 30, 2017

yep - that is definitely why I didn't notice it :)

PS, latest push fixes the labels so that they're all the default sphinx-gallery label instead of the custom ones that were used before. This means that all of the thumbnail descriptions should work now!

@choldgraf choldgraf force-pushed the add_tutorials branch 3 times, most recently from 7d14e7b to 4b07c8c Compare April 30, 2017 03:12
@choldgraf
Copy link
Contributor Author

latest push just removes dempsy badge btw, the tests should be passing. LMK if there's anything else to do. I think this is ready to go from my end.

@story645 story645 changed the title Add tutorials [MRG+1] Add tutorials Apr 30, 2017
@NelleV NelleV merged commit a9a8634 into matplotlib:master Apr 30, 2017
@QuLogic QuLogic changed the title [MRG+1] Add tutorials Add tutorials Apr 30, 2017
@QuLogic QuLogic added this to the 2.1 (next point release) milestone Apr 30, 2017
@jklymak jklymak mentioned this pull request Feb 16, 2021
8 tasks
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.

5 participants