Re: Thanks to all for the help - and a roadie question....
- To: mathgroup at smc.vnet.net
- Subject: [mg33207] Re: [mg33192] Thanks to all for the help - and a roadie question....
- From: BobHanlon at aol.com
- Date: Sat, 9 Mar 2002 03:19:21 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 3/7/02 4:43:16 AM, rob at piovere.com writes: >I can reach out and grab a piece of a 1 dimensional list to plot by >ListPlot[ Take[ list, {m,n} ] ] this plots list from entries m to >n. > >How do you do this with a 2 dimensional array so I can plot whatever section >of the data I want? >Example, if >2list = { {x1,y1}, {x2,y2}.....{xn,yn} } > >How do I use Take[] or an equivalent to select a section of this list to >plot? var[x_Symbol, n_Integer] := ToExpression[ToString[x]<>ToString[n]]; Clear[x,y,n]; data=Table[{var[x,n],var[y,n]}, {n,10}]; Take[data, {5,7}] {{x5, y5}, {x6, y6}, {x7, y7}} data = Table[{200z,Sin[z]},{z,0,3,.1}]; ListPlot[data, PlotJoined -> True]; ListPlot[Take[data, {11,26}], PlotRange->{{0,600},{0,1.025}}, PlotJoined -> True]; Bob Hanlon Chantilly, VA USA