Re: ListPlot and List problem
- To: mathgroup@smc.vnet.net
- Subject: [mg10886] Re: ListPlot and List problem
- From: Paul Abbott <paul@physics.uwa.edu.au>
- Date: Thu, 12 Feb 1998 20:15:18 -0500
- Organization: University of Western Australia
- References: <6bprkj$arg@smc.vnet.net>
Lars Freund wrote:
> I want to plot data that is stored in a file having in the format:
>
> <frequence> <phase> <amplification>
>
> and want to plot the BODE-Diagram. So I did:
>
> myData = ReadList["filename",{Number, Number, Number}];
>
> and now want a plot from <phase> over <frequence> and <amplification>
> over <frequence>I tried things like
>
> ListPlot[Transpose[testData][[3]],PlotJoined->True]
>
> but I always got the wrong list-format. I need
>
> {freqence1,phase1},{freqence2, phase2}...
You are on the right track. For {frequence,phase} pairs you need the
first and second elements of the transposed list (and then you need to
transpose back again):
ListPlot[Transpose[testData][[{1,2}]]//Transpose,PlotJoined->True]
Cheers,
Paul
____________________________________________________________________
Paul Abbott Phone: +61-8-9380-2734
Department of Physics Fax: +61-8-9380-1014
The University of Western Australia Nedlands WA 6907
mailto:paul@physics.uwa.edu.au AUSTRALIA
http://www.pd.uwa.edu.au/~paul
God IS a weakly left-handed dice player
____________________________________________________________________