Re: Read data from an existing file
- To: mathgroup at smc.vnet.net
- Subject: [mg101978] Re: [mg101965] Read data from an existing file
- From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
- Date: Sat, 25 Jul 2009 04:16:12 -0400 (EDT)
- References: <603623.91644.qm@web35607.mail.mud.yahoo.com>
Hi,
you can import your data as "Table" and then you only have to rearange
it a bit to plot it:
data = Import["~/CO/data.txt", "Table"];
buildData[{fst_, rest__}] := {fst, #} & /@ {rest};
ListPlot[Transpose[buildData /@ data], Joined -> True]
Cheers
Patrick
(you have to substitute of course my path in the Import statement)
On Fri, 2009-07-24 at 07:27 -0700, Jun Lin wrote:
> Hi Patrick,
>
> Thanks very much for responding. Attached please find the file including the data I want to plot. The first column is for the argument, and the others are for variables. Thanks again.
>
> Best Regards,
>
> Jun Lin
>
>
> --- On Fri, 7/24/09, Patrick Scheibe <pscheibe at trm.uni-leipzig.de> wrote:
>
> > From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
> > Subject: Re: [mg101965] Read data from an existing file
> > To: jl_03824 at yahoo.com
> > Cc: mathgroup at smc.vnet.net
> > Date: Friday, July 24, 2009, 6:46 AM
> > Hi,
> >
> > this depends strongly on what you mean by *file*. If we
> > don't know how
> > the data is aranged, what filetype, what you want to plot,
> > etc. there's
> > no way to help you.
> >
> > You should check the examples in the documentation of
> > Import or give
> > more details about what you want to do.
> >
> > Cheers
> > Patrick
> >
> > On Fri, 2009-07-24 at 06:14 -0400, jl_03824 at yahoo.com
> > wrote:
> > > Any help will be appreciated. Can anybody tell me how
> > to read data
> > > from an existing file by using "Import"? And how to
> > use the data
> > > imported to draw curves?
> > >
> >
> >
>
>
>