imshow axis directions

Hi,

I was just comparing images displayed with imshow() with what I get from IRAF's display command and ds9. The latter puts the first axis increasing horizontally and the second axis increasing vertically, as if the image array were addressed as img[ix,iy], where ix and iy are integer x and y coordinates. The axes imshow() produces are labeled as if this is true for it as well, but in fact the image is upside down with respect to what I see with IRAF. Even odder, to see the same display I see in IRAF I have to do imshow(img[::-1,:]), as if I'm reversing the direction of the first axis.

I've tried to look at the source, really, but I feel like I'm *years* away from being enough of a Python hacker to understand matplotlib.

Steve

check out the .matplotlibrc image.origin configuration parameter. The default is to have pixel 0,0 on the upper left which is opposite of what us weird astronomers think is the natural locationl

Perry

ยทยทยท

On Apr 7, 2005, at 2:08 PM, Stephen Walton wrote:

Hi,

I was just comparing images displayed with imshow() with what I get from IRAF's display command and ds9. The latter puts the first axis increasing horizontally and the second axis increasing vertically, as if the image array were addressed as img[ix,iy], where ix and iy are integer x and y coordinates. The axes imshow() produces are labeled as if this is true for it as well, but in fact the image is upside down with respect to what I see with IRAF. Even odder, to see the same display I see in IRAF I have to do imshow(img[::-1,:]), as if I'm reversing the direction of the first axis.

I've tried to look at the source, really, but I feel like I'm *years* away from being enough of a Python hacker to understand matplotlib.

Steve

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users