|
From: Jean-Luc M. <jea...@fr...> - 2006-04-05 15:25:09
|
> is there a function in pylab I missed and that already does something > similar? try something like that : import Numeric,pylab,string def plotfromfile(file="data",using=(3,4),skippingline=1): f=open(file,'r') for i in range(skippingline): f.readlines() res=Numeric.array([[string.atof(x)] for x in string.split(y)[using[0]:using[-1]+1] for y in f.readlines()]) for u in using : pylab.plot(res[:,u]) pylab.show() Warning : not tested Jean-Luc |