Only nearest and bilinear are supported for NonUniformImage.

As you suggested, due to a small bug, an exception was not being raised when the interpolation is not one of those two options. This has now been fixed in SVN.

Mike

On 12/13/2010 01:47 PM, Nicolas Bigaouette wrote:
Hi all,

I'm using matplotlib.image.NonUniformImage() to plot a 2D rectilinear grid (non uniform spacing between points):

    im = matplotlib.image.NonUniformImage(grid, extent=extent,
    origin='lower', cmap = matplotlib.cm.jet, interpolation = "nearest")

    im.set_data(x, y, z)

    ax.images.append(im)

    ax.set_xlim(extent_x)

    ax.set_ylim(extent_z)

I have tried using a different interpolation value as in imshow(), but only "nearest" and "bilinear" gives expected results. All others ('bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc' and 'lanczos') show garbage instead of my data.

If the other interpolations are not implemented, there should be at least an assert somewhere...

Thanx


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d


_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to