Re: plotting {x,y} data where y is a array and x a scalar ??
- To: mathgroup at smc.vnet.net
- Subject: [mg12886] Re: plotting {x,y} data where y is a array and x a scalar ??
- From: Martin Kraus <mkraus at theorie3.physik.uni-erlangen.de>
- Date: Wed, 24 Jun 1998 03:44:11 -0400
- Organization: Univ. Erlangen-Nuernberg, Theoret. Physik III
- References: <6m7gth$h1t@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
thomas wrote: > > How to plot data of the form {x,y} where y is a array and x a scalar. > Data is something like this: > {{1,{3,6,8,19,45}},{2,{4,7,8,23,45}},....} ListPlot cant do that or > can it ?? > > Your help is appreciated. Perhaps using MultipleListPlot does what you want: (Honestly spoken I have no idea what you are looking for. :) <<Graphics`MultipleListPlot` t1={{1,{3,6,8,19,45}},{2,{4,7,8,23,45}},{3,{5,6,8,27,45}}}; makePoints[{a_,l_}]:=Map[{a,#}&,l]; t2=Map[makePoints,t1] MultipleListPlot[Sequence@@Transpose[t2],PlotJoined->True] This will draw five lines in this example (with different dashing and point marks). Things get certainly simpler when the first coordinate is known to be 1, 2, 3, ... Hope that helps Martin Kraus