[SciPy-user] step in arrays

Travis Oliphant scipy-user@scipy.net
Mon, 3 Feb 2003 09:10:10 -0700 (MST)


> Thanks,
>
> why is it that, while
>
> xplt.imagesc(b[0:2168:8,0:5004:8])
> and
> xplt.imagesc(b[0:2168:8,5004:0:-8])
>
> display the image with a black background
>
> xplt.imagesc(b[2168:0:-8,0:5004:8])
>
> displays it with a green background?
>

The image is always a byte array and what is plotted is a colormap of
240-255 different colors.

Your image values are transformed into that range.  If you would like a
fixed range, then use cmax=<image value for highest color>  and
cmin=<image value for lowest color> as keywords to the imagesc plot.

But, in your case, the data should be exactly the same (it's just given in
a different order), so I'm not sure what is wrong.

You can do

source(xplt.imagesc) to see what is happening under the covers

Also, xplt.ghelp('pli') can give you the Gist documentation on the
underlying commands.


This does seem like strange behavior.

-Travis