Re: [Matplotlib-users] converting data between axis [0, 1] and data coordinates [min data, max data]

2008-07-02 Thread Nihat
Mike, Thanks for the help. It worked. I have another question but I will send it as a new thread. Nihat On Mon, Jun 30, 2008 at 12:02 PM, Michael Droettboom [EMAIL PROTECTED] wrote: Tony S Yu wrote: On Jun 30, 2008, at 11:13 AM, Michael Droettboom wrote: transScale is where all of

[Matplotlib-users] converting data between axis [0, 1] and data coordinates [min data, max data]

2008-06-30 Thread Nihat
Hello all, I believe it is an easy thing to do but I haven't figured out how to convert between coordinate systems using transData or transAxes. x = numpy.arange(0.0, 1.0+0.01, 0.01) y = numpy.cos(2*2*numpy.pi*x) pylab.plot(x, y) I want to transform y1 to axis scale between 0 and 1. Also, I

Re: [Matplotlib-users] converting data between axis [0, 1] and data coordinates [min data, max data]

2008-06-30 Thread Michael Droettboom
Tony S Yu wrote: 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

Re: [Matplotlib-users] converting data between axis [0, 1] and data coordinates [min data, max data]

2008-06-30 Thread Tony S Yu
On Jun 30, 2008, at 11:13 AM, Michael Droettboom wrote: transScale is where all of the (optionally) logarithmic transformation takes place. I'm surprised transDesired = self.transScale + self.transLimits didn't work for going from data to a (0, 0) - (1, 1) bounding box. Can you provide

Re: [Matplotlib-users] converting data between axis [0, 1] and data coordinates [min data, max data]

2008-06-30 Thread Michael Droettboom
Tony S Yu wrote: On Jun 30, 2008, at 11:13 AM, Michael Droettboom wrote: transScale is where all of the (optionally) logarithmic transformation takes place. I'm surprised transDesired = self.transScale + self.transLimits didn't work for going from data to a (0, 0) - (1, 1) bounding

[Matplotlib-users] converting data between axis [0, 1] and data coordinates [min data, max data]

2008-06-28 Thread n g
Hello all, I believe it is an easy thing to do but I haven't figured out how to convert between coordinate systems using transData or transAxes.Here is the simple_plot.py import numpy import pylab x = numpy.arange(0.0, 1.0+0.01, 0.01) y = numpy.cos(2*2*numpy.pi*x) pylab.plot(x, y) Here I