bug, or am I doing something wrong?

I was playing with interpolation, and this little script does something weird with interpolation. for N<30000 everything is ok. after 30000 it is white...it draws the image, but then every point from 30000 on is white (so with N=60000 the plot is half white). matplotlib 1.01 from enthought distribution 7. am I doing something wrong? seems to only affect interpolation nearest.

    thanks!

      bb

from pylab import *

N=50000

im=randn(20,N)
figure(1)

subplot(2,1,1)
imshow(im,
    aspect='auto',
    )

subplot(2,1,2)
imshow(im,
    cmap=cm.hot,
    aspect='auto',
    interpolation='nearest',
    )

draw()

···

--
Brian Blais
bblais@...1129...
http://web.bryant.edu/~bblais
http://bblais.blogspot.com/

I was playing with interpolation, and this little script does something weird with interpolation. for N<30000 everything is ok. after 30000 it is white...it draws the image, but then every point from 30000 on is white (so with N=60000 the plot is half white). matplotlib 1.01 from enthought distribution 7. am I doing something wrong? seems to only affect interpolation nearest.

You are not doing anything wrong; this looks like a limitation in Agg, pertaining only to the horizontal, not the vertical. I suspect something is being done with a signed 2-byte integer limit. As a workaround, subsample your array when the x-dimension gets too big. Probably we should modify mpl to do that automatically so that we don't hit this limit.

Eric

···

On 07/01/2011 11:34 AM, Brian Blais wrote:

    thanks!

      bb

from pylab import *

N=50000

im=randn(20,N)
figure(1)

subplot(2,1,1)
imshow(im,
     aspect='auto',
     )

subplot(2,1,2)
imshow(im,
     cmap=cm.hot,
     aspect='auto',
     interpolation='nearest',
     )

draw()