From afe43fe2337355b09cbb8e6c9c1c88fde267a692 Mon Sep 17 00:00:00 2001 From: Mustafa Senoglu Date: Tue, 7 Jul 2026 13:13:18 +0300 Subject: [PATCH] DOC: Fix outdated text in image_resampling example Closes #29541 - Update default interpolation description from 'antialiased' to 'auto' - Fix 'upper 100 rows' to 'outer circle' (data is 0.0 in outer circle) - Fix duplicate 'set set' typo --- .../images_contours_and_fields/image_antialiasing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/galleries/examples/images_contours_and_fields/image_antialiasing.py b/galleries/examples/images_contours_and_fields/image_antialiasing.py index 10f563875767..5d3c2f81b843 100644 --- a/galleries/examples/images_contours_and_fields/image_antialiasing.py +++ b/galleries/examples/images_contours_and_fields/image_antialiasing.py @@ -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 # recommended for most situations, and is described below. Note that this # default behaves differently if the image is being down- or up-sampled, as # described below. @@ -166,12 +166,12 @@ # %% # 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 the upper 100 rows is exactly 0.0, and data in the inner circle +# the data in the outer 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* set set to +# 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