Skip to content

Change default interpolation to nearest #4622

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

Closed

Conversation

jenshnielsen
Copy link
Member

As discussed in the Scipy BOF I propose changing the default interpolation of imshow to nearest.

I haven't yet refreshed any of the tests. So this will likely fail.

@jenshnielsen
Copy link
Member Author

Need to refresh the following tests

matplotlib.tests.test_axes.test_specgram_angle_freqs.test
matplotlib.tests.test_axes.test_specgram_magnitude_noise.test
matplotlib.tests.test_axes.test_specgram_magnitude_noise.test
matplotlib.tests.test_axes.test_specgram_noise.test
matplotlib.tests.test_axes.test_specgram_noise.test
matplotlib.tests.test_axes.test_specgram_noise_angle.test
matplotlib.tests.test_backend_svg.test_noscale.test
matplotlib.tests.test_backend_svg.test_noscale.test
matplotlib.tests.test_image.test_image_clip.test
matplotlib.tests.test_image.test_image_clip.test
matplotlib.tests.test_image.test_image_clip.test
matplotlib.tests.test_image.test_image_cliprect.test
matplotlib.tests.test_image.test_image_cliprect.test
matplotlib.tests.test_image.test_image_cliprect.test
matplotlib.tests.test_image.test_image_composite_background.test
matplotlib.tests.test_image.test_image_composite_background.test
matplotlib.tests.test_image.test_image_composite_background.test
matplotlib.tests.test_image.test_rasterize_dpi.test
matplotlib.tests.test_image.test_rasterize_dpi.test
matplotlib.tests.test_patheffects.test_patheffect1.test
matplotlib.tests.test_patheffects.test_patheffect1.test
matplotlib.tests.test_patheffects.test_patheffect1.test
matplotlib.tests.test_patheffects.test_patheffect2.test
matplotlib.tests.test_patheffects.test_patheffect2.test matplotlib.tests.test_patheffects.test_patheffect2.test mpl_toolkits.tests.test_axes_grid.test_imagegrid_cbar_mode_edge.test

@efiring
Copy link
Member

efiring commented Jul 11, 2015

Changing to "nearest" makes sense to me; I have never seen the present default as useful.

@tacaswell
Copy link
Member

👍

@tacaswell tacaswell modified the milestones: next major release, Color overhaul Jul 11, 2015
@@ -714,8 +714,8 @@ class NonUniformImage(AxesImage):
def __init__(self, ax, **kwargs):
"""
kwargs are identical to those for AxesImage, except
that 'interpolation' defaults to 'nearest', and 'bilinear'
is the only alternative.
that 'nearest', and 'bilinear' are the only supported 'interpolation'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the comma be removed between "nearest" and "and 'bilinear'"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdboom
Copy link
Member

mdboom commented Jul 13, 2015

I agree with this change. However, the one downside is that it will increase file sizes for the vector backends (since the data will now be upsampled to the output resolution). We should probably include that as a note in the "What's new" about this change.

@WeatherGod
Copy link
Member

Doesn't that depend on whether the default is 'none' versus 'nearest'?

On Mon, Jul 13, 2015 at 12:47 PM, Michael Droettboom <
[email protected]> wrote:

I agree with this change. However, the one downside is that it will
increase file sizes for the vector backends (since the data will now be
upsampled to the output resolution). We should probably include that as a
note in the "What's new" about this change.


Reply to this email directly or view it on GitHub
#4622 (comment)
.

@mdboom
Copy link
Member

mdboom commented Jul 13, 2015

@WeatherGod: You're right. Ignore my comment.

@astrofrog
Copy link
Contributor

👍 for changing to nearest by default

@jradavenport
Copy link

👍 for nearest. I'm seeing more and more figures making it in to published literature using 'none', which are unreadable. Changing this default would promote best-practices for scientific figures.

@tacaswell tacaswell modified the milestones: Color overhaul, next major release (2.0) Oct 26, 2015
tacaswell and others added 5 commits November 4, 2015 22:50
CLN: Remove various Python 2.6 related workarounds
FIX: Apply asanyarray to arguments for pcolor and family
…ndent

Merge pull request matplotlib#5407 from tacaswell/doc_boxplot
tacaswell and others added 7 commits November 5, 2015 11:29
MNT: Remove uses of font.get_charmap

Conflicts:
    lib/matplotlib/tests/test_font_manager.py

Conflicts with merging the tests, resloved to add only relavent code.
Merge pull request matplotlib#5410 from mdboom/get-charmap-removal
Use a specific version of Freetype for testing
@jenshnielsen
Copy link
Member Author

replaced by #5416 against the correct branch and with the typo fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants