Re: [Matplotlib-users] Images and memory management

2009-10-11 Thread Robert Kern
Leo Trottier wrote: > Hi Michael, > > I suppose I'm a bit confused -- I thought that jpeglib, part of which > is implemented by PIL (??) Other way around. PIL uses jpeglib to read JPEG files. > could process compressed images without > representing decompressing them to a dense raster-image mat

Re: [Matplotlib-users] Images and memory management

2009-10-11 Thread Leo Trottier
Hi Michael, I suppose I'm a bit confused -- I thought that jpeglib, part of which is implemented by PIL (??) could process compressed images without representing decompressing them to a dense raster-image matrix (http://en.wikipedia.org/wiki/Jpeglib). That said, I tried to do some PIL things, an

Re: [Matplotlib-users] Images and memory management

2009-10-05 Thread Michael Droettboom
For some reason, my earlier reply didn't seem to make it to the mailing list. Here it is in its entirety: """ If you assign each figure to a new number, it will keep all of those figures around in memory (because pyplot thinks you may want to use it again.) The best route is to call close('a

Re: [Matplotlib-users] Images and memory management

2009-10-05 Thread Leo Trottier
Hi, I think I've figured out what's going on. It's a combination of things: 1) iPython is ignorant of the problems associated with caching massive data output 2) iPython doesn't seem to have a good way to clear data from memory reliably (https://bugs.launchpad.net/ipython/+bug/412350) 3) matplot

Re: [Matplotlib-users] Images and memory management

2009-10-02 Thread Michael Droettboom
If you assign each figure to a new number, it will keep all of those figures around in memory (because pyplot thinks you may want to use it again.) The best route is to call close('all') or fig.close() with each loop iteration. 40MB per image doesn't sound way out of reason to me. How big ar