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

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

Search the Archive

Re: List of x,y pairs to use with ListPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4711] Re: List of x,y pairs to use with ListPlot
  • From: peter at su.se (unk)
  • Date: Sat, 31 Aug 1996 03:57:31 -0400
  • Organization: Your Organization
  • Sender: owner-wri-mathgroup at wolfram.com

In article <4uph4n$5bb at dragonfly.wolfram.com>, dobitz at ibm.net says...
>
>I want to take two lists, one an intended 'x' and the other an intended 'y' 
>and combine them into one list so I can use them for and x, y plot with the 
>ListPlot function. 
> 
>*---------------------------------- 
>* John K. Dobitz 
>
A straightforward method: c=Table[{x[[i]],y[[i]]},{i,Length[x]}]
where x,y are the vectors that you want to merge.(not elegant but it works)

You could also try: MapThread[({#1,#2})&,{x,y}] or 
MapThread[f,{x,y}]  where f[a_,b_]={a,b};

I hope this helps.

/Peter W


==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: "Optimized" Plane
  • Next by Date: Mersenne Primes
  • Previous by thread: Re: List of x,y pairs to use with ListPlot
  • Next by thread: Tiff to Mma list converter program