On 4/10/07, Iyer <[EMAIL PROTECTED]> wrote: > I'd like to avoid the pylab interface... > linspace is good.
from matplotlib.mlab import linspace But linspace may not be what you want. Probably better: In [1]: Fs = 4. # sampling at 4Hz In [2]: dt = 1./Fs In [3]: import numpy In [4]: ind = numpy.arange(1000.) # the sample number In [5]: t = ind*dt # the sample times In [6]: t[0] Out[6]: 0.0 In [7]: t[1] Out[7]: 0.25 linspace gives a slightly different answer, because it includes the endpoint. Sometimes this is what you want, sometimes not. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users