imshow weirdness

I’m getting weird default behavior from imshow. Namely, the extent
doesn’t seem correct with aspect=‘preserve’. I think this was the subject
of this post:

4a75e7a.jpg Bug
in imshow with aspect=“preserve”?

2004-12-29 11:22

to which John replied thanks for reminding. In any case the following
code shows the problem.

data = ones((5,5))

x=imshow(data, cm.jet, aspect=‘preserve’)

#axis(‘off’)

show()

The output doesn’t look correct to me. If you use axis(‘off’) the right
side white padding disappears, but the image still isn’t centered
correctly.

thanks,

Danny

···

From: Eric Emsellem <emsellem@…654…>

Danny Shevitz wrote:

I'm getting weird default behavior from imshow. Namely, the extent doesn't seem correct with aspect='preserve'. I think this was the subject of this post:

You might want to look at matshow(), which I wrote more or less to give reasonable behavior in the case of matrix displays with the same visual aspect ratio as the row/column one of the array (along with other tweaks).

Cheers,

f