Bug in NonUniformImage?

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

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

···

http://p.sf.net/sfu/lotusphere-d2d


Matplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-users

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