Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 08a98be

Browse files
committed
DOC: add an example and tune up docs
1 parent b0f5888 commit 08a98be

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

examples/images_contours_and_fields/interpolation_methods.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
If `interpolation` is None, it defaults to the :rc:`image.interpolation`
1010
(default: ``'nearest'``). If the interpolation is ``'none'``, then no
1111
interpolation is performed for the Agg, ps and pdf backends. Other backends
12-
will default to ``'nearest'``.
12+
will default to ``'antialiased'``.
1313
1414
For the Agg, ps and pdf backends, ``interpolation = 'none'`` works well when a
1515
big image is scaled down, while ``interpolation = 'nearest'`` works well when
1616
a small image is scaled up.
17+
18+
See :doc:`/gallery/images_contours_and_fields/image_antialiasing` for a
19+
discussion on the default `interpolation="antialiased"` option.
1720
"""
1821

1922
import matplotlib.pyplot as plt

lib/matplotlib/axes/_axes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5503,7 +5503,9 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
55035503
55045504
See
55055505
:doc:`/gallery/images_contours_and_fields/interpolation_methods`
5506-
for an overview of the supported interpolation methods.
5506+
for an overview of the supported interpolation methods, and
5507+
:doc:`/gallery/images_contours_and_fields/image_antialiasing` for
5508+
a discussion of image antialiasing.
55075509
55085510
Some interpolation methods require an additional radius parameter,
55095511
which can be set by *filterrad*. Additionally, the antigrain image

lib/matplotlib/image.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,11 @@ def _resample(
180180
# do antialiasing....
181181
# compare the number of displayed pixels of the image to the number of
182182
# the data pixels.
183-
print(image_obj.origin)
184183
shape = list(data.shape)
185184
if image_obj.origin == 'upper':
186185
shape[0] = 0
187186
dispx, dispy = transform.transform(shape[::-1])
188187
#dispy = transform.transform([data.shape[0], 0])[0]
189-
print('d', dispx, dispy, data.shape[1])
190188
if ((dispx < 3 * data.shape[1] and
191189
dispx != data.shape[1] and
192190
dispx != 2 * data.shape[1]) or

0 commit comments

Comments
 (0)