On 05/17/2010 06:32 AM, Reckoner wrote:
Hi,
Using the following
pcolor(x,y,z,shading='interp')
is it possible to change the interpolation method used? I noticed that
there are set_interpolation methods for images created using
In [83]: h = imshow( z)
In [84]: h.set_interpolation?
Type: instancemethod
Base Class: type 'instancemethod'
String Form: bound method AxesImage.set_interpolation of
matplotlib.image.AxesImage object at 0x047B27D0
Namespace: Interactive
File: c:\python26\lib\site-packages\matplotlib\image.py
Definition: h.set_interpolation(self, s)
Docstring:
Set the interpolation method the image uses when resizing.
ACCEPTS: ['nearest' | 'bilinear' | 'bicubic' | 'spline16' |
'spline36' | 'hanning' | 'hamming' | 'hermite' | 'kaiser' |
'quadric' | 'catrom' | 'gaussian' | 'bessel' | 'mitchell' |
'sinc' | 'lanczos' | ]
are these available for pcolor?
No. Pcolor simply fills quadrilaterals. There is a NonUniformImage
class that accepts image interpolation options. I don't think anyone
has ever gotten around to giving it a nice interface via an Axes method
or pyplot function, but there is an example of its use:
http://matplotlib.sourceforge.net/examples/pylab_examples/image_nonuniform.html
In the svn version of mpl there is also a gouraud shading option to
pcolormesh, which provides interpolation on non-rectangular grids.
Eric
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users