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

Bitbucket commits-noreply at bitbucket.org
Thu Sep 6 09:30:02 PDT 2012


4 new commits in yt:


https://bitbucket.org/yt_analysis/yt/changeset/84404a462580/
changeset:   84404a462580
branch:      yt
user:        ngoldbaum
date:        2012-09-06 04:08:07
summary:     The callback list needs to be set in the constructor otherwise all
callbacks that have ever been created will be drawn for (say) the last
frame of an animation.
affected #:  1 file

diff -r e5d136902e9c0e72fa86f20a8c10fdb833667ad4 -r 84404a462580eb7281511bbf31edb7e44c0da68a yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -453,7 +453,6 @@
 class PWViewer(PlotWindow):
     _unit = None
     _colormaps = defaultdict(lambda: 'algae')
-    _callbacks = []
     _field_transform = {}
     """A viewer for PlotWindows.
 
@@ -461,6 +460,7 @@
     def __init__(self, *args,**kwargs):
         setup = kwargs.pop("setup", True)
         PlotWindow.__init__(self, *args,**kwargs)
+        self._callbacks = []
         self.setup_callbacks()
         for field in self._frb.data.keys():
             if self.pf.field_info[field].take_log:
@@ -928,7 +928,7 @@
         axis = fix_axis(axis)
         (bounds,center) = GetBoundsAndCenter(axis, center, width, pf)
         slc = pf.h.slice(axis, center[axis], fields=fields)
-        PWViewerMPL.__init__(self, slc, bounds, origin=origin)
+        self.viewer = PWViewerMPL.__init__(self, slc, bounds, origin=origin)
         self.set_axes_unit(axes_unit)
 
 class ProjectionPlot(PWViewerMPL):



https://bitbucket.org/yt_analysis/yt/changeset/3c632bca4d4d/
changeset:   3c632bca4d4d
branch:      yt
user:        ngoldbaum
date:        2012-09-06 04:09:51
summary:     Removing the viewer member of SlicePlot, it wasn't necessary.
affected #:  1 file

diff -r 84404a462580eb7281511bbf31edb7e44c0da68a -r 3c632bca4d4d74357202497fc25d834dc97b5f93 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -928,7 +928,7 @@
         axis = fix_axis(axis)
         (bounds,center) = GetBoundsAndCenter(axis, center, width, pf)
         slc = pf.h.slice(axis, center[axis], fields=fields)
-        self.viewer = PWViewerMPL.__init__(self, slc, bounds, origin=origin)
+        PWViewerMPL.__init__(self, slc, bounds, origin=origin)
         self.set_axes_unit(axes_unit)
 
 class ProjectionPlot(PWViewerMPL):



https://bitbucket.org/yt_analysis/yt/changeset/0a36773eb6e9/
changeset:   0a36773eb6e9
branch:      yt
user:        ngoldbaum
date:        2012-09-06 17:13:08
summary:     field_transforms and unit should be class properties as well.
affected #:  1 file

diff -r 3c632bca4d4d74357202497fc25d834dc97b5f93 -r 0a36773eb6e9511e65c772bc2621dbe9a5d19f0b yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -451,16 +451,16 @@
         pass
 
 class PWViewer(PlotWindow):
-    _unit = None
     _colormaps = defaultdict(lambda: 'algae')
-    _field_transform = {}
     """A viewer for PlotWindows.
 
     """
     def __init__(self, *args,**kwargs):
         setup = kwargs.pop("setup", True)
         PlotWindow.__init__(self, *args,**kwargs)
+        self._unit = None
         self._callbacks = []
+        self._field_transform = {}
         self.setup_callbacks()
         for field in self._frb.data.keys():
             if self.pf.field_info[field].take_log:



https://bitbucket.org/yt_analysis/yt/changeset/551e1238ab38/
changeset:   551e1238ab38
branch:      yt
user:        ngoldbaum
date:        2012-09-06 18:27:59
summary:     Moving _colormaps as well.
affected #:  1 file

diff -r 0a36773eb6e9511e65c772bc2621dbe9a5d19f0b -r 551e1238ab38bfd9f1951e6a3fe692cc995e5768 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -451,7 +451,6 @@
         pass
 
 class PWViewer(PlotWindow):
-    _colormaps = defaultdict(lambda: 'algae')
     """A viewer for PlotWindows.
 
     """
@@ -461,6 +460,7 @@
         self._unit = None
         self._callbacks = []
         self._field_transform = {}
+        self._colormaps = defaultdict(lambda: 'algae')
         self.setup_callbacks()
         for field in self._frb.data.keys():
             if self.pf.field_info[field].take_log:

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