[yt-svn] commit/yt: ngoldbaum: Use the nice latex representation for units in field labels

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Aug 12 11:35:31 PDT 2015


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/df2dbfbb91c7/
Changeset:   df2dbfbb91c7
Branch:      yt
User:        ngoldbaum
Date:        2015-08-12 14:35:28+00:00
Summary:     Use the nice latex representation for units in field labels
Affected #:  1 file

diff -r a0e9ba7aa5d29687c7094a0762fedd11e82d3fb4 -r df2dbfbb91c7690db0bffafc27f37911a63c3c9b yt/fields/derived_field.py
--- a/yt/fields/derived_field.py
+++ b/yt/fields/derived_field.py
@@ -215,7 +215,7 @@
             units = Unit(self.units)
         # Add unit label
         if not units.is_dimensionless:
-            data_label += r"\ \ (%s)" % (units)
+            data_label += r"\ \ (%s)" % (units.latex_representation())
 
         data_label += r"$"
         return data_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