[yt-svn] commit/yt-3.0: scopatz: Added fix for #428.

Bitbucket commits-noreply at bitbucket.org
Tue Sep 25 13:24:27 PDT 2012


1 new commit in yt-3.0:


https://bitbucket.org/yt_analysis/yt-3.0/changeset/59f152e4f59d/
changeset:   59f152e4f59d
branch:      yt-3.0
user:        scopatz
date:        2012-09-25 22:24:15
summary:     Added fix for #428.
affected #:  1 file

diff -r 75f4ac240c16db56b51c64567fc164c40083d56f -r 59f152e4f59df720d28ee225c0c31d77863c8f1c yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -1,4 +1,4 @@
-"""
+""" 
 A plotting mechanism based on the idea of a "window" into the data.
 
 Author: J. S. Oishi <jsoishi at gmail.com>
@@ -762,11 +762,15 @@
         return names
 
     def _send_zmq(self):
-        from IPython.zmq.pylab.backend_inline import \
-                    send_figure
+        try:
+            # pre-IPython v0.14
+            from IPython.zmq.pylab.backend_inline import send_figure as display
+        except ImportError:
+            # IPython v0.14+ 
+            from IPython.core.display import display
         for k, v in sorted(self.plots.iteritems()):
             canvas = FigureCanvasAgg(v.figure)
-            send_figure(v.figure)
+            display(v.figure)
 
     def show(self):
         r"""This will send any existing plots to the IPython notebook.

Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/

--

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