Re: ListPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg107852] Re: ListPlot
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Mon, 1 Mar 2010 04:41:52 -0500 (EST)
On 2/28/10 at 4:52 AM, jwa0 at 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.