From: Andrew S. <str...@as...> - 2008-06-08 22:55:59
|
Hi (Eric?), Re-running an older script of mine today, I notice a change of behavior with imshow(). The script below produces the attached 2 figures for MPL 0.91.3 and svn from today (labeled "0.98.0"). I believe that the behavior of 0.91.3 was correct -- the image is not cropped, its aspect ratio is maintained, and the data coordinates correspond to the pixel coordinates. I am also including the original image used in this example. import matplotlib, pylab import Image im = Image.open('eye_map.gif') im_extent = (0, im.size[0], 0, im.size[1]) pylab.imshow(im,origin='lower', extent=im_extent, aspect='equal') fname = 'extent_bug_%s.png'%matplotlib.__version__ pylab.savefig(fname) Please let me know if I can do more. Note that I have shifted the image mode to an 8-bit palette for the .pngs with GIMP to save space in this email, but otherwise the images are exactly as emitted by MPL. Thanks, Andrew |