[yt-svn] commit/yt: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Apr 22 20:28:40 PDT 2013


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/fccec7a78458/
Changeset:   fccec7a78458
Branch:      yt
User:        scopatz
Date:        2013-04-22 22:11:35
Summary:     re-added improved PWViewerMPL.show_or_save()
Affected #:  1 file

diff -r 54de3b5fda5d8a9f074cd672ca2a6e066b9f77fc -r fccec7a78458ee2d4b65808bc20f6d86fd298fd4 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -1033,6 +1033,14 @@
         else:
             raise YTNotInsideNotebook
 
+    def show_or_save(self, name=None, mpl_kwargs=None):
+        """Will attempt to show the plot in in an IPython notebook.  Failing that, the 
+        plot will be saved to disk."""
+        try:
+            return self.show()
+        except YTNotInsideNotebook:
+            return self.save(name=name, mpl_kwargs=mpl_kwargs)
+
 class SlicePlot(PWViewerMPL):
     r"""Creates a slice plot from a parameter file
 


https://bitbucket.org/yt_analysis/yt/commits/dd62805d9db9/
Changeset:   dd62805d9db9
Branch:      yt
User:        scopatz
Date:        2013-04-22 22:33:23
Summary:     show_or_save() -> display()
Affected #:  1 file

diff -r fccec7a78458ee2d4b65808bc20f6d86fd298fd4 -r dd62805d9db99dfc664e47ec2c1bee2d5365c8fc yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -1033,7 +1033,7 @@
         else:
             raise YTNotInsideNotebook
 
-    def show_or_save(self, name=None, mpl_kwargs=None):
+    def display(self, name=None, mpl_kwargs=None):
         """Will attempt to show the plot in in an IPython notebook.  Failing that, the 
         plot will be saved to disk."""
         try:

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