Services & Resources / Wolfram Forums
MathGroup Archive
*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

Hi Lars,

when You read Your data You get a list

{{phi1,omega1,g1}, {phi2,omega2,g2}, ..}

You Transpose[] is nonsens because it creates a list with

You need

ListPlot[ myData /. {phi_?NumericQ, omega_?NumericQ, _} :> {omega,phi}]

this is fast and elegant.

If You really want to use Transpose[] You must use it twice

      Transpose[myData], (* { phis, omegas, amps} *)
     ]  (* { phi, omegas }    *)
   ]    (* {omegas,phis}      *)
 ]      (* {{phi1,omega1},..} *)

The comments after the closing of an command describe how Your data are
looking when the command is complete.

Hope that helps

> Hi,
> 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}...
> and I always get things like
> {phase1, phase2, phase3} or so.
> Can anybody help me a bit?
> Thanks,
> Lars

  • Prev by Date: Re: MathLink and Win95
  • Next by Date: Re: Active Plots
  • Prev by thread: Re: ListPlot and List problem
  • Next by thread: Re: ListPlot and List problem