[yt-svn] commit/yt: MatthewTurk: Fixing scaling of data->pixels in the callbacks.
Bitbucket
commits-noreply at bitbucket.org
Tue Jul 24 19:58:28 PDT 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/e62a6e4015c5/
changeset: e62a6e4015c5
branch: yt
user: MatthewTurk
date: 2012-07-25 04:58:19
summary: Fixing scaling of data->pixels in the callbacks.
affected #: 1 file
diff -r 01ebfe5512122b5181ec1058a380bd2fa42754b4 -r e62a6e4015c51793c8b7b0e6e678d65553b24332 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -54,8 +54,8 @@
xx0, xx1 = plot._axes.get_xlim()
y0, y1 = plot.ylim
yy0, yy1 = plot._axes.get_ylim()
- return ((coord[0]-x0)/(x1-x0)*(xx0-xx1) - xx0,
- (coord[0]-x0)/(x1-x0)*(xx0-xx1) - xx0)
+ return ((coord[0]-x0)/(x1-x0)*(xx1-xx0) + xx0,
+ (coord[1]-y0)/(y1-y0)*(yy1-yy0) + yy0)
class VelocityCallback(PlotCallback):
_type_name = "velocity"
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