Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
SiddharthKarmokar wants to merge3 commits intomatplotlib:main
base:main
Choose a base branch
Loading
fromSiddharthKarmokar:issue29541
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,10 +63,10 @@
#
# ``interpolation_stage='data'``: Data -> Interpolate/Resample -> Normalize -> RGBA
#
# For both keyword arguments, Matplotlibhas a default"antialiased", that is
#recommended for most situations, and isdescribed below. Note that this
# defaultbehaves differently if the image is being down- or up-sampled, as
#described below.
# For both keyword arguments, Matplotlibuses a defaultvalue of "auto" as
#specified by the rcParam, which isrecommended for most situations.
Comment on lines +66 to +67
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 thercParam, you should reference it with:

:rc:`name.of.rcParam`

to get thercParam default automatically inserted.

#Thisdefaultbehavior is explained below. Note that the behavior may differ if the
#image is being down- or up-sampled, as outlined below.
#
# Down-sampling and modest up-sampling
# ====================================
Expand DownExpand Up@@ -166,16 +166,19 @@
# %%
# A final example shows the desirability of performing the anti-aliasing at the
# RGBA stage when using non-trivial interpolation kernels. In the following,
# the data in theupper 100 rows is exactly 0.0, and data in the inner circle
# the data in theouter circle is exactly 0.0, and data in the inner circle
# is exactly 2.0. If we perform the *interpolation_stage* in 'data' space and
# use an anti-aliasing filter (first panel), then 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. This can be avoided if
# you do not use an anti-aliasing filter (*interpolation* setsetto
# you do not use an anti-aliasing filter (*interpolation* set to
# 'nearest'), however, that makes the part of the data susceptible to Moiré
# patterns much worse (second panel). Therefore, we recommend the default
# *interpolation* of 'hanning'/'auto', and *interpolation_stage* of
# 'rgba'/'auto' for most down-sampling situations (last panel).
# 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.

a = alarge + 1
cmap = plt.get_cmap('RdBu_r')
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp