From: John on
Mathematica 6, XP windows

Help says ListPlot plots lists of points, but my attempts to plot the
following two lists failed:

ListPlot[{{{1,y1},{1,y2},{1,y3}},{{2,y4},{2,y5},{2,y6}}}]

The second entries in each pair are simulated values of random
variables having the normal distribution, with specified parameters.

The plot would have instructional value because the students could
compare different samples side by side.

I would appreciate hearing from anyone who knows how to do this.

John


From: Bill Rowe on
On 2/28/10 at 4:52 AM, jwa0(a)lehigh.edu (John) wrote:

>Mathematica 6, XP windows

>Help says ListPlot plots lists of points, but my attempts to plot
>the following two lists failed:

>ListPlot[{{{1,y1},{1,y2},{1,y3}},{{2,y4},{2,y5},{2,y6}}}]

>The second entries in each pair are simulated values of random
>variables having the normal distribution, with specified parameters.

It would be useful if you would post a bit more code and state
what you mean by "failed". Assuming, the variables y1 etc. have
assigned values, you should have seen a plot with six data
points. Here us something similar to your description that
results in a plot

data = {{1, #} & /@
RandomReal[NormalDistribution[1, 1], 3], {2, #} & /@
RandomReal[NormalDistribution[2, 1], 3]};

ListPlot[data, Frame -> True, PlotMarkers -> Automatic]

I've done two things to make the data more visible. Create a
=46rame to prevent the default vertical axis from hiding the
points with an x location of 1 and specified
PlotMarkers->Automatic to increase the size of the plotted
points from the default.


From: Tomas Garza on
Perhaps something along the following lines might help:

y:==RandomReal[NormalDistribution[0,1]];
With[{samplesize==4,numberofsamples==5},
Graphics[Table[Style[Text[ToString[k],{j,y}],Red,Bold],{k,1,samplesize},{j,1,numberofsamples}],PlotRange->{{0.8,numberofsamples+0.2},{-3,3}},Frame->True,GridLines->{Table[j,{j,1,numberofsamples}],{-3,-2,-1,0,1,2,3}},FrameLabel->"sample number",FrameTicks->{Table[k,{k,1,numberofsamples}],Automatic}]]

The numbers in red are the values obtained in each sample (sometimes they will appear overwritten}. Instead of numbers you could use points in different colors, but it seems slightly more complicated.

Tomas

> Date: Sun, 28 Feb 2010 04:52:59 -0500
> From: jwa0(a)lehigh.edu
> Subject: ListPlot
> To: mathgroup(a)smc.vnet.net
>
> Mathematica 6, XP windows
>
> Help says ListPlot plots lists of points, but my attempts to plot the
> following two lists failed:
>
> ListPlot[{{{1,y1},{1,y2},{1,y3}},{{2,y4},{2,y5},{2,y6}}}]
>
> The second entries in each pair are simulated values of random
> variables having the normal distribution, with specified parameters.
>
> The plot would have instructional value because the students could
> compare different samples side by side.
>
> I would appreciate hearing from anyone who knows how to do this.
>
> John
>
From: Bob Hanlon on

y[n_] := RandomReal[NormalDistribution[0, 1/n]]

You will see the results more readily by using by using Frame and larger markers.

data = Table[{x, y[x]}, {x, 3}, {15}];

yMax = Max[Abs[data][[All, All, 2]]];

ListPlot[data,
PlotRange -> 1.05 yMax {-1, 1},
Frame -> True, Axes -> False,
PlotStyle -> AbsolutePointSize[6],
AspectRatio -> 2]


Bob Hanlon

---- John <jwa0(a)lehigh.edu> wrote:

=============
Mathematica 6, XP windows

Help says ListPlot plots lists of points, but my attempts to plot the
following two lists failed:

ListPlot[{{{1,y1},{1,y2},{1,y3}},{{2,y4},{2,y5},{2,y6}}}]

The second entries in each pair are simulated values of random
variables having the normal distribution, with specified parameters.

The plot would have instructional value because the students could
compare different samples side by side.

I would appreciate hearing from anyone who knows how to do this.

John



From: Nasser M. Abbasi on

"John" <jwa0(a)lehigh.edu> wrote in message news:hmded5$p1m$1(a)smc.vnet.net...
> Mathematica 6, XP windows
>
> Help says ListPlot plots lists of points, but my attempts to plot the
> following two lists failed:
>
> ListPlot[{{{1,y1},{1,y2},{1,y3}},{{2,y4},{2,y5},{2,y6}}}]
>
> The second entries in each pair are simulated values of random
> variables having the normal distribution, with specified parameters.
>
> The plot would have instructional value because the students could
> compare different samples side by side.
>
> I would appreciate hearing from anyone who knows how to do this.
>
> John
>
>

I am not sure what failed on your end as you did not say, but It worked ok
on my PC, using M7, I see all points ok?

http://12000.org/tmp/022810/plot.png

May be you did not see the points at the edge? Just need to make the plot
range a little bigger to see the point ok, but they were there.

--Nasser