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

Skip to content

DOC: improve interpolation kwarg doc in imshow [ci doc] #25585

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

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Changes from all 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
14 changes: 9 additions & 5 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5508,11 +5508,15 @@ def imshow(self, X, cmap=None, norm=None, *, aspect=None,
'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell',
'sinc', 'lanczos', 'blackman'.

If *interpolation* is 'none', then no interpolation is performed
on the Agg, ps, pdf and svg backends. Other backends will fall back
to 'nearest'. Note that most SVG renderers perform interpolation at
rendering and that the default interpolation method they implement
may differ.
The data *X* is resampled to the pixel size of the image on the
figure canvas, using the interpolation method to either up- or
downsample the data.

If *interpolation* is 'none', then for the ps, pdf, and svg
backends no down- or upsampling occurs, and the image data is
passed to the backend as a native image. Note that different ps,
pdf, and svg viewers may display these raw pixels differently. On
other backends, 'none' is the same as 'nearest'.

If *interpolation* is the default 'antialiased', then 'nearest'
interpolation is used if the image is upsampled by more than a
Expand Down