From: n g <ng...@gm...> - 2008-06-28 21:08:28
|
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 want to transform y1 to axis scale between 0 and 1. Also, I want to transform axis scale, say 0.25, to a corresponding y value in the data coordinates. pylab.show() Currently I am doing it manually scaling things with axis limits, etc. I believe the neat thing is to use the transforms api. Can somebody explain me how it is done with transforms? I am using 0.98.1. Thanks in advance, Nihat |