Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Update antialiased default to auto and fix documentation errors #29571

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
wants to merge 3 commits into
base: main
Choose a base branch
Loading
from

Conversation

SiddharthKarmokar
Copy link

PR summary

This PR updates the comments in the image_antialiasing.py example to clarify the behavior of interpolation and anti-aliasing. Specifically, it mentions that data values are clipped at the edges of the color range and no floating-point imprecision is visible.

Minor formatting fixes are also included.

PR checklist

@github-actions github-actions bot added the Documentation: examples files in galleries/examples label Feb 3, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@@ -63,7 +63,7 @@
#
# ``interpolation_stage='data'``: Data -> Interpolate/Resample -> Normalize -> RGBA
#
# For both keyword arguments, Matplotlib has a default "antialiased", that is
# For both keyword arguments, Matplotlib has a default "auto", that is
Copy link
Member

Choose a reason for hiding this comment

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

Strictly, interpolation has an rcParam that is used. Although in the default rc-file it is indeed "auto". Good find of the doc error though, but ideally it should be rewritten to reflect the rcParam.

Copy link
Author

@SiddharthKarmokar SiddharthKarmokar Feb 5, 2025

Choose a reason for hiding this comment

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

For both keyword arguments, Matplotlib uses a default value of "auto" as
specified by the rcParam, which is recommended for most situations.This default behavior is explained below. Note that the behavior may differ if the image is being down- or up-sampled, as outlined below.

Updated the text to properly reference rcParam, new contributor here, can you please explain to me why the "codecov/project/tests" check fail for the amended request?

Comment on lines +66 to +67
# For both keyword arguments, Matplotlib uses a default value of "auto" as
# specified by the rcParam, which is recommended for most situations.
Copy link
Member

Choose a reason for hiding this comment

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

If the default is to fall back to the rcParam, you should reference it with:

:rc:`name.of.rcParam`

to get the rcParam default automatically inserted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: examples files in galleries/examples
Projects
Status: Waiting for author
Development

Successfully merging this pull request may close these issues.

[Doc]: A few problems on Image resampling page
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.