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
Andrew,
Yes, and it looks like there is more to it: the draw() method doesn't seem to be working (or getting called at the right time) in interactive mode, but no exception is being raised, either. I will look into it.
Eric
Andrew Straw wrote:
···
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
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
------------------------------------------------------------------------
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options