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