[Yt-svn] yt: minmaxtick had a backwards if statement that caused log_fiel...
hg at spacepope.org
hg at spacepope.org
Thu Apr 29 17:33:59 PDT 2010
hg Repository: yt
details: yt/rev/ae9295fe98c9
changeset: 1632:ae9295fe98c9
user: Sam Skillman <samuel.skillman at colorado.edu>
date:
Thu Apr 29 18:32:01 2010 -0600
description:
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.
diffstat:
yt/raven/PlotTypes.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (14 lines):
diff -r de49046e223b -r ae9295fe98c9 yt/raven/PlotTypes.py
--- a/yt/raven/PlotTypes.py Thu Apr 29 16:24:07 2010 -0700
+++ b/yt/raven/PlotTypes.py Thu Apr 29 18:32:01 2010 -0600
@@ -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