Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

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
____________________________________________________________________



  • Prev by Date: Re: Error Bars
  • Next by Date: Re: Exporting animations to MPEG or AVI?
  • Prev by thread: Re: ListPlot and List problem
  • Next by thread: MathLink and Win95