Scatter Diagram

Author

Eric W. Weisstein
September 23, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Graphics/ScatterDiagram.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/ScatterDiagram.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Additional Authors

Scatterplot figures by 
John Renze
September 20, 2004

Data

data=Table[Random[],{2},{50},{2}]

ListPlot

<<Graphics`Colors`

ListPlot[data[[1]],AxesOrigin->{0,0},PlotStyle->{Red,PointSize[.021]},AxesLabel->TraditionalForm/@{x,y}]

sampledata = {{2.5, 211}, {3.9, 167}, {2.9, 131},
    {2.4, 191}, {2.9, 220}, {0.8, 297}, {0.7, 300},
    {7.9, 107}, {1.8, 167}, {1.9, 266}, {0.8, 227},
    {6.5, 86}, {1.6, 207}, {5.8, 115}, {1.3, 285},
    {1.2, 199}, {2.7, 172}};

diagram1 = ListPlot[sampledata, PlotStyle ->
    {Red, AbsolutePointSize[4]}, FrameLabel ->
    (StyleForm[#,FontFamily->"Times",FontSlant->"Italic"]&/@{"wine consumed", "heart disease deaths"}),
   Frame -> True,PlotRange->All]

diagram2 = Show[
Block[{$DisplayFunction=Identity},
{
ListPlot[sampledata,    PlotStyle -> {Red, AbsolutePointSize[4]}],
Plot[Evaluate[Fit[sampledata, {1, x}, x]],
    {x, 0, 8}]
}
],
 Frame->True,FrameLabel ->(StyleForm[#,FontFamily->"Times",FontSlant->"Italic"]&/@{"wine consumed", "heart disease deaths"}), Axes -> False]

MultipleListPlot

<<Graphics`MultipleListPlot`

MultipleListPlot[data,AxesOrigin->{0,0},SymbolStyle->{Red,{PointSize[.02],Blue}},
SymbolShape->{PlotSymbol[Box],Point},AxesLabel->TraditionalForm/@{x,y}]