[Yt-svn] yt-commit r1329 - branches/yt-1.5/yt/raven trunk/yt/raven

joishi at wrangler.dreamhost.com joishi at wrangler.dreamhost.com
Tue Jun 9 12:29:46 PDT 2009


Author: joishi
Date: Tue Jun  9 12:29:45 2009
New Revision: 1329
URL: http://yt.spacepope.org/changeset/1329

Log:
fixed bug in PlotCollectionInteractive's ability to clear plots
synced trunk and 1.5


Modified:
   branches/yt-1.5/yt/raven/PlotCollection.py
   trunk/yt/raven/PlotCollection.py

Modified: branches/yt-1.5/yt/raven/PlotCollection.py
==============================================================================
--- branches/yt-1.5/yt/raven/PlotCollection.py	(original)
+++ branches/yt-1.5/yt/raven/PlotCollection.py	Tue Jun  9 12:29:45 2009
@@ -50,7 +50,7 @@
         if center == None:
             v,self.c = pf.h.find_max("Density") # @todo: ensure no caching
         else:
-            self.c = center
+            self.c = na.array(center, dtype='float64')
         if deliverator_id > 0:
             self.submit = True
             self._run_id = deliverator_id
@@ -412,6 +412,7 @@
             del self.plots[-1].data
             del self.plots[-1]
 
+    @rootonly
     def save_book(self, filename):
         from pyPdf import PdfFileWriter, PdfFileReader
         outfile = PdfFileWriter()
@@ -486,9 +487,9 @@
 
     def clear_plots(self):
         for plot in self.plots:
-            self.pylab.figure(pylab._fig_num)
+            self.pylab.figure(plot._fig_num)
             self.pylab.clf()
-        PlotCollection.clear_data(self)
+        PlotCollection.clear_plots(self)
 
 def get_multi_plot(nx, ny, colorbar = 'vertical', bw = 4, dpi=300):
     """

Modified: trunk/yt/raven/PlotCollection.py
==============================================================================
--- trunk/yt/raven/PlotCollection.py	(original)
+++ trunk/yt/raven/PlotCollection.py	Tue Jun  9 12:29:45 2009
@@ -487,9 +487,9 @@
 
     def clear_plots(self):
         for plot in self.plots:
-            self.pylab.figure(pylab._fig_num)
+            self.pylab.figure(plot._fig_num)
             self.pylab.clf()
-        PlotCollection.clear_data(self)
+        PlotCollection.clear_plots(self)
 
 def get_multi_plot(nx, ny, colorbar = 'vertical', bw = 4, dpi=300):
     """



More information about the yt-svn mailing list