Skip to content

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

Closed
jklymak wants to merge 2 commits into
matplotlib:masterfrom
jklymak:addsamplepcolorcontour
Closed

jklymak wants to merge 2 commits into
matplotlib:masterfrom
jklymak:addsamplepcolorcontour

Conversation

@jklymak

@jklymak jklymak commented Oct 13, 2017

Copy link
Copy Markdown
Member

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

anntzer commented Oct 13, 2017

Copy link
Copy Markdown
Contributor

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

jklymak commented Oct 13, 2017 •

Copy link
Copy Markdown
Member Author

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

anntzer commented Oct 13, 2017

Copy link
Copy Markdown
Contributor

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

jklymak commented Oct 13, 2017

Copy link
Copy Markdown
Member Author

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

anntzer commented Oct 13, 2017

Copy link
Copy Markdown
Contributor

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

@jklymak

jklymak commented Oct 13, 2017

Copy link
Copy Markdown
Member Author

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

@anntzer

anntzer commented Oct 13, 2017

Copy link
Copy Markdown
Contributor

@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

jklymak commented Oct 13, 2017

Copy link
Copy Markdown
Member Author

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