[SciPy-user] plt.image: zoom too far?

eric jones eric at enthought.com
Tue Aug 6 17:56:36 EDT 2002


Yep, this is a known bug.  The zooming feature relies on wxPython to
zoom the image, and it looks like wxPython generates the entire image
when scaling it resulting in a memory explosion.  This needs
reimplementation to solve the problem for images.  It doesn't affect
scatter plots -- just images.

A patch would be very welcomed. :-)

Eric


> -----Original Message-----
> From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net]
On
> Behalf Of Adam C. Finnefrock
> Sent: Tuesday, August 06, 2002 4:22 PM
> To: scipy-user
> Subject: [SciPy-user] plt.image: zoom too far?
> 
> Hi all,
> 
> Has anyone had trouble using plt.image and zooming in too far?
> 
> The symptoms are either using all available memory (Linux, > 400MB)
> or showing a blank white window (Linux, Windows).
> 
> Example:
> 
> >>> import gui_thread
> >>> <Importing wxPython...  done.>
> >>> from scipy import *
> 
> >>> from scipy import plt
> >>> img = plt.lena()
> >>> plt.image(img)
> 
> 1.  Use the mouse, zoom in on the eye near the center of the image.
>     (In linux, python's memory usage peaks and then returns to
original
> value.)
> 2.  Now, zoom in closer using the mouse so that just the iris and
pupil
> would
>     be shown.  (In linux, memory usage rises to > 400MB and this disk
> starts
>     swapping.  In Windows, the image is not rendered but instead a
white
>     canvas is shown.)
> 
> Same results can be obtained on the command-line:
> >>> z=plt.image(img)
> >>> z.x_axis.bounds = [245,250]
> >>> z.y_axis.bounds = [245,250]
> >>> z.update()
> 
> Is this a known bug?  Should I be posting to scipy-devel instead?
> 
> 
> Thanks,
> Adam
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user




More information about the SciPy-User mailing list