[Yt-svn] yt: 2 new changesets

hg at spacepope.org hg at spacepope.org
Mon May 17 11:34:39 PDT 2010


hg Repository: yt
details:   yt/rev/0ef996661d63
changeset: 1675:0ef996661d63
user:      John Wise <jwise at astro.princeton.edu>
date:
Mon May 17 14:33:49 2010 -0400
description:
Replace underscores with a space for colorbar label.

hg Repository: yt
details:   yt/rev/94da55d2cbb2
changeset: 1676:94da55d2cbb2
user:      John Wise <jwise at astro.princeton.edu>
date:
Mon May 17 14:34:21 2010 -0400
description:
Unit conversion should reference pf instead of the hierarchy

diffstat:

 yt/extensions/DualEPS.py |  5 ++++-
 yt/raven/Callbacks.py    |  2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 84955a16c71c -r 94da55d2cbb2 yt/extensions/DualEPS.py
--- a/yt/extensions/DualEPS.py	Fri May 14 20:05:11 2010 -0700
+++ b/yt/extensions/DualEPS.py	Mon May 17 14:34:21 2010 -0400
@@ -395,9 +395,12 @@
             proj = "Proj" in plot._type_name and \
                    plot.data._weight is None
             _zlabel = plot.pf.field_info[plot.axis_names["Z"]].get_label(proj)
+            print _zlabel
+            _zlabel = _zlabel.replace("_","\;")
+            print _zlabel
             _zlog = plot.log_field
         else:
-            _zlabel = plot._z_label
+            _zlabel = plot._z_label.replace("_","\;")
             _zlog = plot._log_z
         _zrange = (plot.norm.vmin, plot.norm.vmax)
         self.colorbar(_cmap, zrange=_zrange, label=_zlabel, log=_zlog, **kwargs)
diff -r 84955a16c71c -r 94da55d2cbb2 yt/raven/Callbacks.py
--- a/yt/raven/Callbacks.py	Fri May 14 20:05:11 2010 -0700
+++ b/yt/raven/Callbacks.py	Mon May 17 14:34:21 2010 -0400
@@ -734,7 +734,7 @@
         dx = (plot.xlim[1] - plot.xlim[0])/nx
         dy = (plot.ylim[1] - plot.ylim[0])/ny
 
-        unit_conversion = plot.data.hierarchy[plot.im["Unit"]]
+        unit_conversion = plot.pf[plot.im["Unit"]]
         aspect = (plot.xlim[1]-plot.xlim[0])/(plot.ylim[1]-plot.ylim[0])
 
         print "aspect ratio = ", aspect



More information about the yt-svn mailing list