[yt-svn] commit/yt: ngoldbaum: Fixing another place where we should check for 3D positions.

Bitbucket commits-noreply at bitbucket.org
Thu Oct 4 22:00:10 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/b8175a113d8e/
changeset:   b8175a113d8e
branch:      yt
user:        ngoldbaum
date:        2012-10-05 06:59:58
summary:     Fixing another place where we should check for 3D positions.
affected #:  1 file

diff -r 066a7b53b64de31705574ca71dd06fd130327689 -r b8175a113d8ed98c0e8d514579ab607b01494565 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -728,9 +728,13 @@
         self.plot_args = plot_args
 
     def __call__(self, plot):
+        if len(self.pos) == 3:
+            pos = (self.pos[x_dict[plot.data.axis]],
+                   self.pos[y_dict[plot.data.axis]])
+        else: pos = self.pos
         from matplotlib.patches import Arrow
         # Now convert the pixels to code information
-        x, y = self.convert_to_plot(plot, self.pos)
+        x, y = self.convert_to_plot(plot, pos)
         dx, dy = self.convert_to_plot(plot, self.code_size, False)
         arrow = Arrow(x, y, dx, dy, **self.plot_args)
         plot._axes.add_patch(arrow)

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