X Tutup
Skip to content

MEP12 of showcase's examples + other folders.#7952

Merged
anntzer merged 8 commits intomatplotlib:masterfrom
NelleV:MEP12_showcase
Jan 29, 2017
Merged

MEP12 of showcase's examples + other folders.#7952
anntzer merged 8 commits intomatplotlib:masterfrom
NelleV:MEP12_showcase

Conversation

@NelleV
Copy link
Copy Markdown
Member

@NelleV NelleV commented Jan 26, 2017

Small MEP12-ifying showcase.

refs #7206

@NelleV NelleV changed the title MEP12 of showcase's examples MEP12 of showcase's examples + other folders. Jan 26, 2017
@@ -1,62 +0,0 @@
"""
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I removed this example is being broadly a duplicate of interpolation_methods.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It does point out an important difference between the "none" and "nearest" methods though. This information needs to remain available somewhere.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You mean the text or the example itself?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Both of the text and the images IMO, though not necessarily as an example (eg. it could be a FAQ entry instead).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think it is very unlikely that anyone goes to that example to understand the difference between None and nearest. I think the interpolation methods (accompanied by more text explanation) is more than enough to understand the difference.

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.

It does not have to be an example but I would be very sorry to see that figure go. I have on several occasions benefitted from having this figure to explain the difference. A graphical explanation is so much more powerfull than text only. The interpolation_methods.py example does nothing to explain this as None none and nearest are rendered identically

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You mean interpolation_methods.py? Right now it certainly doesn't contain all this information.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No, but too much information is also not useful. We need to drastically cut down the number of examples we have because we dilute the information too much. I can add more text on the interpolation_methods.py example but if I have to do this for all examples we'll never have a gallery or even documentation that is in any way useful.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've added some detailed text to interpolation methods, mostly copy pasting from the example I removed.

I am stressing once again that we need to cut back the number of examples. Most are extremely poorly designed, with unclear message and can be merged into one single example. It drowns the information too much.

To be specific, we have more than 500 examples right now, many displaying several images. There is no way anyone can sort or process any kind of information from these. If it helps convince you, I can have a communication expert look at the examples and the text and help us with the process of cleaning up our gallery.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I completely agree with your assessment that we have too many examples and that many are poorly designed. However this specific example is exactly addressing a very specific question (the apparent duplication of interpolation methods between "none" and "nothing"). Thus my suggestion to move it to a FAQ entry.

@anntzer
Copy link
Copy Markdown
Contributor

anntzer commented Jan 26, 2017

http://matplotlib.org/examples/pylab_examples/manual_axis.html seems worth removing as well.

This example displays the difference between interpolation methods for imshow
and matshow.

If `intperpolation` is None, it defaults to the rc image.interpolation
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.

typo: interpolation


If `intperpolation` is None, it defaults to the rc image.interpolation
parameter. If the interpolation is `none`, then no interpolation is performed
for the Agg, ps and pdf backends. Other backends will defult to 'nearest'.
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.

in the Agg, ps, and pdf
And "Other backends default to nearest"

# from the docs:
For the Agg, ps and pdf backends, interpolation = 'none' works well when a big
image is scaled down, while interpolation = 'nearest' works well when a small
image is blown up.
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.

large image is scaled down, small image is scaled up. May as well keep the language parallel.

"""
Simple demo of a scatter plot.
=============
Scatter plots
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.

Scatter plot

@NelleV NelleV closed this Jan 27, 2017
@NelleV NelleV reopened this Jan 27, 2017
@NelleV
Copy link
Copy Markdown
Member Author

NelleV commented Jan 27, 2017

I've fixed the typos in the text I added to the interpolation_methods example. That text clearly needs more work, but I think it is out of the scope of this PR.

@story645 story645 changed the title MEP12 of showcase's examples + other folders. [MRG + 1] MEP12 of showcase's examples + other folders. Jan 29, 2017
@anntzer
Copy link
Copy Markdown
Contributor

anntzer commented Jan 29, 2017

Thanks, merging and opening a separate issue regarding interpolation_none_vs_nearest.

@anntzer anntzer merged commit efdd7ad into matplotlib:master Jan 29, 2017
@QuLogic QuLogic changed the title [MRG + 1] MEP12 of showcase's examples + other folders. MEP12 of showcase's examples + other folders. Feb 5, 2017
@QuLogic QuLogic added this to the 2.1 (next point release) milestone Feb 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

X Tutup