Perry Greenfield schrieb:
> if the above code is in a loop, and there is no figure clearing in the 
> loop, then
>
> rotated_images[i] = []
> gc.collect(2)
>
> will have no effect since matplotlib will still have references to the 
> array (and generally, you never need to call gc.collect by the way).
I do / did not know whether matplotlib is actually refering to my array 
(in that context dereferencing it will not free memory), or actually 
copying the data at one instance (in that case it should help). So, as 
you can see I am lacking the inside-knowledge of matplotlib, and was 
just trying some things which were not doing any harm (at least this is 
what I suppose).

 But I would expect that figure clearing would not only free memory, but 
also erase the formerly inserted images, right? *That* would harm ;).
> What isn't clear to me in this is how you handle the offsetting and 
> combining of images. Normally imshow will just display one image right 
> over the other. Can you just  insert the appropriate subsampled image 
> into one output image, and then display that. After the insertion, you 
> can delete the input image inside  the loop.
I am doing the offsetting by calculating and setting proper axes in my 
coordinate-system, so each imshow is done in a new, tiny axes inside the 
same figure, all of them without any kind of border around them. The big 
axes giving the box with the x- and y-ticks and the labels is create 
before that, and not filled directly (it is empty so to say). In this 
fashion I can overlay pictures precisely (or that is what I am trying). 
Of course, I am completely open to any suggestions on how to achieve 
this goal with different methods ...

Cheers, Gerd


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to