8000 [Doc]: A few problems on Image resampling page · Issue #29541 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

[Doc]: A few problems on Image resampling page #29541

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

Open
svank opened this issue Jan 28, 2025 · 2 comments · May be fixed by #29571
Open

[Doc]: A few problems on Image resampling page #29541

svank opened this issue Jan 28, 2025 · 2 comments · May be fixed by #29571

Comments

@svank
Copy link
Contributor
svank commented Jan 28, 2025

Documentation Link

https://matplotlib.org/devdocs/gallery/images_contours_and_fields/image_antialiasing.html

Problem

I was reading this docs page to better understand the changes in #28061, and I noticed a few things I think need fixing:

  • Just before the "Down-sampling and modest up-sampling" header, it says "For both keyword arguments, Matplotlib has a default "antialiased"...", but that default is now auto.

  • Just before the "Up-sampling" header, the example is discussing how in the first panel, "floating point imprecision makes some of the data values just a bit less than zero or a bit more than 2.0, and they get assigned the under- or over- colors". I don't see that occurring in the first panel of the plot. I see this:

Image

but I wonder if it's supposed to look more like this plot from #28061:

Image

What I see currently in the docs is also what I get running the example locally, though. If what I see in the docs is intended,

  • In that same example, it says "In the following, the data in the upper 100 rows is exactly 0.0, and data in the inner circle is exactly 2.0." Aren't the values of exactly 0.0 in the outer circle, not the upper 100 rows?

  • Lastly, again in that example, "(interpolation set set to 'nearest')" has an extra "set".

Suggested improvement

No response

@jklymak
Copy link
Member
jklymak commented Jan 28, 2025

For sure a few things probably changed after this page was written. Any help you could give with it would be appreciated!

@SiddharthKarmokar
Copy link

In response to the original text regarding floating-point imprecision, I’ve added the following lines to clarify the behavior in the first panel of the example:

In this example, the data values are clipped at the edges of the color range. The interpolation uses the 'nearest' method, and as a result, no floating-point imprecision is visible in the first panel.

Please let me know if this revision accurately reflects the intended behavior or if further adjustments are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0