On Jun 30, 2008, at 10:22 AM, Nihat wrote: > ax = gca() > (x_screen, y_screen) = ax.transData.transform([x[10], y[10]) > (x10, y10) = ax.transAxes.inverted().transform([x_screen, y_screen]) > > Is it the proper way of doing it? Where can I find more info on > transformations in general?
I'd really be interested to know the answer to this question, too. I recently wanted to do this exact same transformation. When I tried >>> (x10, y10) = ax.transLimits.transform([x[10], y[10]) I got the desired input for *linear* data. Looking looking at the definitions of the axes transforms in the code (Axes class in axes.py) you see that: >>> self.transData = self.transScale + (self.transLimits + self.transAxes) where `self` is the Axes object. It would seem that your sequence of operations (`transData.transform` followed by `transAxes.inverted().transform`) should be equivalent to: >>> transDesired = self.transScale + self.transLimits But, when I tried using this transform, I didn't get the desired transformation for logarithmic data. Any transform experts out there? -Tony ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users