MathGroup Archive 2007

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

Search the Archive

Re: Plotting x and y arrays

  • To: mathgroup at
  • Subject: [mg82657] Re: Plotting x and y arrays
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at>
  • Date: Sat, 27 Oct 2007 06:05:35 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <ffsc78$mp4$>

John Lee wrote:
> I have a table of x values and a separate table of corresponding y values. Is there a way to plot these values directly without using MapThread and without creating a new table to store the x and y values?
> Thanks,
> John

Say xvals ans yvals are two tables that contain the x and y values, 
respectively. Then you can use

ListPlot[Transpose[{xvals, yvals}]]

to plot the data. For instance,

xvals = RandomReal[{0, 5}, {20}]
yvals = Sin@xvals
ListPlot[Transpose[{xvals, yvals}], Filling -> Axis]


  • Prev by Date: Usage button in Information (?) request
  • Next by Date: Re: New LevinIntegrate package for highly oscillatory integration
  • Previous by thread: Re: Plotting x and y arrays
  • Next by thread: Tooltip does not what I expect it to do