[Yt-svn] yt-commit r1712 - trunk/yt/raven

skillman at wrangler.dreamhost.com skillman at wrangler.dreamhost.com
Thu Apr 29 17:44:39 PDT 2010


Author: skillman
Date: Thu Apr 29 17:44:38 2010
New Revision: 1712
URL: http://yt.enzotools.org/changeset/1712

Log:
minmaxtick had a backwards if statement that caused log_fields to not allow the minmaxtick=True parameter.  Also needed to update how the ticker worked to set the ticks correctly.



Modified:
   trunk/yt/raven/PlotTypes.py

Modified: trunk/yt/raven/PlotTypes.py
==============================================================================
--- trunk/yt/raven/PlotTypes.py	(original)
+++ trunk/yt/raven/PlotTypes.py	Thu Apr 29 17:44:38 2010
@@ -197,8 +197,8 @@
                 self.colorbar.locator = matplotlib.ticker.FixedLocator(ticks)
                 self.colorbar.formatter = matplotlib.ticker.FixedFormatter(["%0.2e" % (x) for x in ticks])
             elif minmaxtick:
-                if not self.log_field: 
-                    ticks = na.array(self.colorbar._ticker()[0],dtype='float')
+                if self.log_field: 
+                    ticks = na.array(self.colorbar._ticker()[1],dtype='float')
                     ticks = [zmin] + ticks.tolist() + [zmax]
                     self.colorbar.locator = matplotlib.ticker.FixedLocator(ticks)
                     self.colorbar.formatter = matplotlib.ticker.FixedFormatter(["%0.2e" % (x) for x in ticks])



More information about the yt-svn mailing list