[yt-svn] commit/yt: ngoldbaum: Updating plot window to respect field display names.
Bitbucket
commits-noreply at bitbucket.org
Thu Aug 23 03:28:01 PDT 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/b73d49ef9875/
changeset: b73d49ef9875
branch: yt
user: ngoldbaum
date: 2012-08-23 04:43:33
summary: Updating plot window to respect field display names.
affected #: 1 file
diff -r 12729ee9bbd5e18fb9f477aee8a5fc2c70a97452 -r b73d49ef9875f1a49e14ac2d05e1cdb3ebed3849 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -667,10 +667,12 @@
self.plots[f].axes.set_xlabel(labels[0])
self.plots[f].axes.set_ylabel(labels[1])
+ field_name = self.data_source.pf.field_info[f].display_name
+
if md['units'] == None or md['units'] == '':
- label = r'$\rm{'+f.encode('string-escape')+r'}$'
+ label = r'$\rm{'+field_name.encode('string-escape')+r'}$'
else:
- label = r'$\rm{'+f.encode('string-escape')+r'}\/\/('+md['units']+r')$'
+ label = r'$\rm{'+field_name.encode('string-escape')+r'}\/\/('+md['units']+r')$'
self.plots[f].cb.set_label(label)
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