One quick way of doing this is to use numpy: import numpy
dataset = numpy.genfromtxt(fname='yourfilename',skip_header=1) http://docs.scipy.org/doc/numpy/reference/generated/numpy.genfromtxt.html On Tue, Nov 1, 2011 at 8:50 AM, yelena <somebo...@inbox.lv> wrote: > > Hi! > I'm new at Matplotlib, so I need a little help. > I was trying to load data from txt files with no luck. > I have 2 collumns in txt files and I need to plot a XY graph. Should I > modify txt file to other format? > > Can someone give me a simple example for doing this? > > In txt file could be such information: > Meters Seconds > 1 4 > 2 8 > 3 12 > 4 16 > 5 20 > > Thanks in advance! > > -- > View this message in context: > http://old.nabble.com/Loading-txt-files-tp32758393p32758393.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > RSA® Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Daniel Hyams dhy...@gmail.com ------------------------------------------------------------------------------ RSA® Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users