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

Bitbucket commits-noreply at bitbucket.org
Mon Oct 29 09:02:10 PDT 2012


2 new commits in yt:


https://bitbucket.org/yt_analysis/yt/changeset/6a953d29db94/
changeset:   6a953d29db94
branch:      yt
user:        chiffre
date:        2012-10-29 14:49:37
summary:     Fixed the Marker-Callback
affected #:  1 file

diff -r 189d2eace2e91e9ac7aeae9593fe465b50b6cf92 -r 6a953d29db94693d7f5ee950622cb291e528221d yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -743,13 +743,18 @@
         self.plot_args = plot_args
 
     def __call__(self, plot):
-        if len(self.pos) == 3:
+        xx0, xx1 = plot._axes.get_xlim()
+        yy0, yy1 = plot._axes.get_ylim()
+        if na.array(self.pos).shape == (3,):
             pos = (self.pos[x_dict[plot.data.axis]],
                    self.pos[y_dict[plot.data.axis]])
-        else: pos = self.pos
+        elif na.array(self.pos).shape == (2,):
+            pos = self.pos
         x,y = self.convert_to_plot(plot, pos)
         plot._axes.hold(True)
-        plot._axes.plot((x,),(y,),self.marker, **self.plot_args)
+        plot._axes.scatter(x,y, marker = self.marker, **self.plot_args)
+        plot._axes.set_xlim(xx0,xx1)
+        plot._axes.set_ylim(yy0,yy1)
         plot._axes.hold(False)
 
 class SphereCallback(PlotCallback):



https://bitbucket.org/yt_analysis/yt/changeset/4180878cc840/
changeset:   4180878cc840
branch:      yt
user:        chiffre
date:        2012-10-29 17:00:04
summary:     Changed the prefix for numpy
affected #:  1 file

diff -r 6a953d29db94693d7f5ee950622cb291e528221d -r 4180878cc840a3443148bd9a5e755ad17643f722 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -745,10 +745,10 @@
     def __call__(self, plot):
         xx0, xx1 = plot._axes.get_xlim()
         yy0, yy1 = plot._axes.get_ylim()
-        if na.array(self.pos).shape == (3,):
+        if np.array(self.pos).shape == (3,):
             pos = (self.pos[x_dict[plot.data.axis]],
                    self.pos[y_dict[plot.data.axis]])
-        elif na.array(self.pos).shape == (2,):
+        elif np.array(self.pos).shape == (2,):
             pos = self.pos
         x,y = self.convert_to_plot(plot, pos)
         plot._axes.hold(True)

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