[Yt-svn] yt-commit r735 - branches/yt-1.0/yt/raven trunk/yt/raven

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Thu Aug 21 11:37:03 PDT 2008


Author: mturk
Date: Thu Aug 21 11:37:02 2008
New Revision: 735
URL: http://yt.spacepope.org/changeset/735

Log:
Seems like colormap changing didn't always update the colorbar.  This should
fix it...



Modified:
   branches/yt-1.0/yt/raven/PlotTypes.py
   trunk/yt/raven/PlotTypes.py

Modified: branches/yt-1.0/yt/raven/PlotTypes.py
==============================================================================
--- branches/yt-1.0/yt/raven/PlotTypes.py	(original)
+++ branches/yt-1.0/yt/raven/PlotTypes.py	Thu Aug 21 11:37:02 2008
@@ -310,6 +310,10 @@
         self.image = \
             self._axes.imshow(buff, interpolation='nearest', norm = self.norm,
                             aspect=1.0, picker=True, origin='lower')
+        if self.cmap is not None:
+            self.image.set_cmap(self.cmap)
+            if self.colorbar is not None:
+                self.colorbar.set_cmap(self.cmap)
         self._reset_image_parameters()
         self._run_callbacks()
 

Modified: trunk/yt/raven/PlotTypes.py
==============================================================================
--- trunk/yt/raven/PlotTypes.py	(original)
+++ trunk/yt/raven/PlotTypes.py	Thu Aug 21 11:37:02 2008
@@ -310,6 +310,10 @@
         self.image = \
             self._axes.imshow(buff, interpolation='nearest', norm = self.norm,
                             aspect=1.0, picker=True, origin='lower')
+        if self.cmap is not None:
+            self.image.set_cmap(self.cmap)
+            if self.colorbar is not None:
+                self.colorbar.set_cmap(self.cmap)
         self._reset_image_parameters()
         self._run_callbacks()
 



More information about the yt-svn mailing list