[Yt-svn] commit/yt: jsoishi: workaround so non-logged fields work again in plot window widget now that ticks have been added.
Bitbucket
commits-noreply at bitbucket.org
Wed Apr 27 13:30:51 PDT 2011
1 new changeset in yt:
http://bitbucket.org/yt_analysis/yt/changeset/ad6289488dbd/
changeset: r4213:ad6289488dbd
branch: yt
user: jsoishi
date: 2011-04-27 22:30:01
summary: workaround so non-logged fields work again in plot window widget now that ticks have been added.
affected #: 1 file (153 bytes)
--- a/yt/visualization/plot_window.py Wed Apr 27 15:02:53 2011 -0400
+++ b/yt/visualization/plot_window.py Wed Apr 27 13:30:01 2011 -0700
@@ -346,7 +346,8 @@
zoom_fac = na.log10(x_width*self._frb.pf['unitary'])/na.log10(min_zoom)
zoom_fac = 100.0*max(0.0, zoom_fac)
ticks = self.get_ticks(self._frb[field].min(),
- self._frb[field].max())
+ self._frb[field].max(),
+ take_log = self._frb.pf.field_info[field].take_log)
payload = {'type':'png_string',
'image_data':img_data,
'metadata_string': self.get_metadata(field),
@@ -355,8 +356,10 @@
payload.update(addl_keys)
ph.add_payload(payload)
- def get_ticks(self, mi, ma, height = 400):
+ def get_ticks(self, mi, ma, height = 400, take_log = False):
# This will eventually change to work with non-logged fields
+ if not take_log:
+ return []
ll = LogLocator()
tick_locs = ll(mi, ma)
ticks = []
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list