[yt-svn] commit/yt: atmyers: Merged in hyschive/yt-hyschive (pull request #2141)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Apr 29 10:24:43 PDT 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/35a1eb08de41/
Changeset:   35a1eb08de41
Branch:      yt
User:        atmyers
Date:        2016-04-29 17:24:31+00:00
Summary:     Merged in hyschive/yt-hyschive (pull request #2141)

Allow users to completely specify the filename of a 1D profile
Affected #:  1 file

diff -r e3f37d2893ac2696f4836980cfc0679f5ed7c399 -r 35a1eb08de41efe96e42804b49a6993098af311c yt/visualization/profile_plotter.py
--- a/yt/visualization/profile_plotter.py
+++ b/yt/visualization/profile_plotter.py
@@ -248,6 +248,7 @@
         if not suffix:
             suffix = "png"
         suffix = ".%s" % suffix
+        fullname = False
         if name is None:
             if len(self.profiles) == 1:
                 prefix = self.profiles[0].ds
@@ -259,6 +260,7 @@
             if sfx != '':
                 suffix = sfx
                 prefix = name[:name.rfind(suffix)]
+                fullname = True 
             else:
                 prefix = name
         xfn = self.profiles[0].x_field
@@ -270,7 +272,10 @@
             if isinstance(uid, tuple):
                 uid = uid[1]
             canvas = canvas_cls(fig)
-            fns.append("%s_1d-Profile_%s_%s%s" % (prefix, xfn, uid, suffix))
+            if fullname:
+                fns.append("%s%s" % (prefix, suffix))
+            else:
+                fns.append("%s_1d-Profile_%s_%s%s" % (prefix, xfn, uid, suffix))
             mylog.info("Saving %s", fns[-1])
             canvas.print_figure(fns[-1])
         return fns

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-svn-spacepope.org/attachments/20160429/85ac4486/attachment.htm>


More information about the yt-svn mailing list