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

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Mon Sep 7 17:59:17 PDT 2009


Author: mturk
Date: Mon Sep  7 17:59:16 2009
New Revision: 1433
URL: http://yt.spacepope.org/changeset/1433

Log:
Quick hack to add a label_kws property to VMPlots so that arguments about the
label of colorbars can be passed in to _autoset_label.  Working on a rewrite of
plotting subsystem to keep state and thus avoid this kind of manipulation.



Modified:
   trunk/yt/raven/PlotTypes.py

Modified: trunk/yt/raven/PlotTypes.py
==============================================================================
--- trunk/yt/raven/PlotTypes.py	(original)
+++ trunk/yt/raven/PlotTypes.py	Mon Sep  7 17:59:16 2009
@@ -270,6 +270,7 @@
                                     top=1.0, left=0.0, right=1.0)
         self.setup_domain_edges(self.data.axis, periodic)
         self.cmap = None
+        self.label_kws = {}
         self.__setup_from_field(field)
         self.__init_temp_image(use_colorbar)
 
@@ -438,7 +439,7 @@
             data_label = self.pf.field_info[field_name].get_label(proj)
         else: data_label = self.datalabel
         if self.colorbar != None:
-            self.colorbar.set_label(str(data_label))
+            self.colorbar.set_label(str(data_label), **self.label_kws)
 
 class FixedResolutionPlot(VMPlot):
 



More information about the yt-svn mailing list