MathGroup Archive 1999

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

Search the Archive

Re: Want to plot list with modified x-axis.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20480] Re: Want to plot list with modified x-axis.
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Wed, 27 Oct 1999 02:04:47 -0400
  • References: <7v3dhu$63i@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I. Ioannou <iioannou at u.washington.edu> wrote in message
news:7v3dhu$63i at smc.vnet.net...
> Hi all,
>
> I've been trying to plot a list which comes out of a table (a string of
> 10K numbers basically) with modified x-axis. If I were to "listplot", I'd
> get the x-axis to go from 0 to 10,000. I want to scale that by a physical
> factor and plot that way instead.
>
> I tried ParametricPlot[{physicalfactor*n,mylist[[n]],{n,1,10000}] but
> nothing good happened. Just a lot of error messages. (Part::pspec, and
> ParametricPlot:pptr)
>
> By the way, what's the easiest way to debug using these error messages?
> Like enter into the sequence of things that mathematica does and identify
> where the error came from in detail?
>
> Back to my original question, how can I generate these plots? I also tried
> the standard Plot function. However, my function has a lot of sharp
> (resonant) features (Bessel functions) and I don't seem to be able to tell
> Mathematica to plot it properly. I need to fiddle with MaxBend,
> PlotPoints, PlotDivision. Any clarification on these would be wellcome, as
> the help files don't seem entirely clear to me.
>
> Thanks, John
> --
>       Ioannis   I    Ioannou                   phone: (206)-543-1372
>       g-2 group, Atomic Physics                fax:   (206)-685-0635
>       Department of Physics
>       University of Washington        e-mail: iioannou at u.washington.edu
>

John,
You can  use the two coordinate input for ListPlot

ListPlot[ Transpose[{physicalfactor * mylist, mylist}]]

You will find a detailed account of MaxBend etc in my column How and Why in
Mathematica in Education and Research, Vol 7 No 3  Summer 1998.
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565




  • Prev by Date: Re: Preventing NotebookWrite From Wrapping
  • Next by Date: Re: service pack for Mathematica?
  • Previous by thread: Re: Want to plot list with modified x-axis.
  • Next by thread: Re: Want to plot list with modified x-axis.