Skip to content

[Doc] add pcolor and contour to tutorials/introductory/sample_plots.py #9387

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

Closed
wants to merge 2 commits into from

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Oct 13, 2017

PR Summary

tutorials/introductory/sample_plots.py didn't have a pcolor plot or an example of contour!

PR Checklist

  • Documentation is sphinx and numpydoc compliant

@jklymak jklymak changed the title Addsamplepcolorcontour Doc add pcolor and contour to tutorials/introductory/sample_plots.py Oct 13, 2017
@jklymak jklymak changed the title Doc add pcolor and contour to tutorials/introductory/sample_plots.py [Doc] add pcolor and contour to tutorials/introductory/sample_plots.py Oct 13, 2017
@anntzer
Copy link
Contributor

anntzer commented Oct 13, 2017

fwiw (not directly related but perhaps you can also remove it here) there seems to be an extraneous plot at the bottom of the page, see below http://matplotlib.org/devdocs/tutorials/introductory/sample_plots.html#xkcd-style-sketch-plots

@jklymak
Copy link
Member Author

jklymak commented Oct 13, 2017

Well, it does get used for the thumbnail. But can I choose one of the other plots for the thumbnail?

I'll just leave it, but include a section heading and bit of commentary so it doesn't look so mysterious. There is probably a way to suppress the code as well, but it does't hurt anything....

@anntzer
Copy link
Contributor

anntzer commented Oct 13, 2017

Ah... looks like a feature (pick a thumbnail not in the notebook) we should ask the s-g gallery folks about (I think it's a nice thumbnail). @choldgraf ? :-)

Also, there's no imshow example, which seems waaay more fundamental. Perhaps something like:

The imshow() function (I'd replace "command" by "function" throughout, we're not MATLAB...) can be used to make a colored representation of a 2D array.
(example)
If the underlying array uses irregular sampling, consider using pcolormesh()
(example)
Contour plots, created by contour() and contourf(), are yet another way to represent 2D data.
(example)

@jklymak
Copy link
Member Author

jklymak commented Oct 13, 2017

OK, I can do that. I thought I was being good and economical by choosing an example that had pcolor and contour in one figure, but I'm happy to add a few more examples.

(I was pretty surprised that none of these functions made it onto the "sample plots" page, since they are the main type of visualization I do - even more fundamental than line plots)

@anntzer
Copy link
Contributor

anntzer commented Oct 13, 2017

It's all a matter of field of application I guess... (typically imshow is enough for me :-))

@jklymak
Copy link
Member Author

jklymak commented Oct 13, 2017

Ooops, made git mistake. Closing and re-opening.

@anntzer
Copy link
Contributor

anntzer commented Oct 13, 2017

@jklymak git push --force / git push --force-with-lease should let you reuse the same PR. At least I tend to use it quite liberally (on PRs only of course).

@jklymak
Copy link
Member Author

jklymak commented Oct 13, 2017

Ahhh. I should have done that! Thanks.

@jklymak jklymak deleted the addsamplepcolorcontour branch March 5, 2019 16:08
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.

3 participants