Hi all,

I found a small bug, where Figure.clf() was erroneously leaving some axes 
instances in the Figure.axes list.  It turns out the method was deleting 
items from the list while iterating over it.  Attached is a patch.

Mike

Index: figure.py
===================================================================
--- figure.py	(revision 3198)
+++ figure.py	(working copy)
@@ -1,7 +1,7 @@
 """
 Figure class -- add docstring here!
 """
-import sys
+import sys, copy
 import artist
 from artist import Artist
 from axes import Axes, Subplot, PolarSubplot, PolarAxes
@@ -515,7 +515,7 @@
         """
         Clear the figure
         """
-        for ax in self.axes:
+        for ax in copy.copy(self.axes):
             ax.cla()
             self.delaxes(ax)
 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to