[yt-svn] commit/yt: MatthewTurk: Fixing issue when display_name is None

Bitbucket commits-noreply at bitbucket.org
Tue Aug 28 06:13:25 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/70fe4d11ef4f/
changeset:   70fe4d11ef4f
branch:      yt
user:        MatthewTurk
date:        2012-08-28 15:13:18
summary:     Fixing issue when display_name is None
affected #:  1 file

diff -r 467f57bae9aa354b03872f7f9b02587ce4d9bad8 -r 70fe4d11ef4f36c9fc98ed2018017a1b531c000d yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -706,7 +706,7 @@
             self.plots[f].axes.set_ylabel(labels[1])
 
             field_name = self.data_source.pf.field_info[f].display_name
-
+            if field_name is None: field_name = f
             if md['units'] == None or md['units'] == '':
                 label = r'$\rm{'+field_name.encode('string-escape')+r'}$'
             else:

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