[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 wa

[Matplotlib-users] sync x axes on top and bottom

2007-08-10 Thread N G
Hi, I have created a plot where I have time in minutes at the bottom x-axis. I have another axis with clock-time (hh:mm) at the top x-axis. I use SpanSelector to zoom in the x-axis only. Whenever I zoom in or zoom out on the minute axis I would like to sync the hh:mm axis as well. I used xtick