-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API: imshow make rgba the defaut stage when down-sampling
imshow used to default to interpolating in data space. That makes sense for up-sampled images, but fails in odd ways for down-sampled images. Here we introduce a new default value for *interpolation_stage* 'antialiased', which changes the interpolation stage to 'rgba' if the data is downsampled or upsampled less than a factor of three.
- Loading branch information
Showing
12 changed files
with
375 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
imshow *interpolation_stage* default changed to 'antialiased' | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The *interpolation_stage* keyword argument `~.Axes.imshow` has a new default | ||
value 'antialiased'. For images that are down-sampled or up-sampled less than | ||
a factor of three, image interpolation will occur in 'rgba' space. For images | ||
that are up-sampled by more than a factor of 3, then image interpolation occurs | ||
in 'data' space. | ||
|
||
The previous default was 'data', so down-sampled images may change subtly with | ||
the new default. However, the new default also avoids floating point artifacts | ||
at sharp boundaries in a colormap when down-sampling. | ||
|
||
The previous behavior can achieved by changing :rc:`image.interpolation_stage`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.