From 7e4924f8b0b70708dfa9e206d8b3e08eb776c98d Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Fri, 10 Jul 2015 18:05:11 -0500 Subject: [PATCH 1/3] Change default image interpolation to nearest --- lib/matplotlib/rcsetup.py | 2 +- matplotlibrc.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/rcsetup.py b/lib/matplotlib/rcsetup.py index afe9aecc9e6a..bc595d32634c 100644 --- a/lib/matplotlib/rcsetup.py +++ b/lib/matplotlib/rcsetup.py @@ -894,7 +894,7 @@ def validate_cycler(s): 'mathtext.fallback_to_cm': [True, validate_bool], 'image.aspect': ['equal', validate_aspect], # equal, auto, a number - 'image.interpolation': ['bilinear', six.text_type], + 'image.interpolation': ['nearest', six.text_type], 'image.cmap': ['jet', six.text_type], # one of gray, jet, etc 'image.lut': [256, validate_int], # lookup table 'image.origin': ['upper', six.text_type], # lookup table diff --git a/matplotlibrc.template b/matplotlibrc.template index 01efc3bc23ee..0eae9f44075a 100644 --- a/matplotlibrc.template +++ b/matplotlibrc.template @@ -353,7 +353,7 @@ backend : %(backend)s ### IMAGES #image.aspect : equal # equal | auto | a number -#image.interpolation : bilinear # see help(imshow) for options +#image.interpolation : nearest # see help(imshow) for options #image.cmap : jet # gray | jet etc... #image.lut : 256 # the size of the colormap lookup table #image.origin : upper # lower | upper From 041bd4da8f0fe1594fa87b26d5227317254e18f7 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Fri, 10 Jul 2015 18:06:46 -0500 Subject: [PATCH 2/3] Change docstring to reflect new default interpolation --- lib/matplotlib/image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/image.py b/lib/matplotlib/image.py index 188d991981a6..2e29a9515716 100644 --- a/lib/matplotlib/image.py +++ b/lib/matplotlib/image.py @@ -733,8 +733,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' + options. """ interp = kwargs.pop('interpolation', 'nearest') AxesImage.__init__(self, ax, From 7357f1b865df103058ceebaf42b27ccc2271c4c5 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Fri, 6 Nov 2015 11:31:56 +0000 Subject: [PATCH 3/3] fix typo --- lib/matplotlib/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/image.py b/lib/matplotlib/image.py index 2e29a9515716..72b19b5d11e4 100644 --- a/lib/matplotlib/image.py +++ b/lib/matplotlib/image.py @@ -733,7 +733,7 @@ class NonUniformImage(AxesImage): def __init__(self, ax, **kwargs): """ kwargs are identical to those for AxesImage, except - that 'nearest', and 'bilinear' are the only supported 'interpolation' + that 'nearest' and 'bilinear' are the only supported 'interpolation' options. """ interp = kwargs.pop('interpolation', 'nearest')