| |||||
Introducing SharpPlot Your First Chart Recent Updates Tutorials General Tutorials Chart Tutorials Reference SharpPlot Class Properties Methods Structures Enumerations Style examples Glossaries Active Charts VectorMath Class DBUtil Class Get SharpPlot Download SharpPlot Buying SharpPlot SharpPlot Support Upgrading from GraPL Release notes |
Home > Sample Charts > Histogram > Overlayed Normal Curve Overlayed Normal CurveThe Histogram does one very simple job – it takes a large sample of values and shows how they are grouped. Many samples of data turn out to follow a bell-shaped curve called the Normal distribution, but often the shape of the plot gives some useful clues which can be hidden simply by looking at statistics such as the Mean or Range. The final example draws a theoretical bellcurve centred on the mean. In this case (the data is the sum of 3 dice throws) we confidently expect a Normal distribution. For many datasets, it will be necessary to compute a more complex theoretical curve and overlay it with a call to LineGraph as an indepentent secondary chart. SharpPlot sp = new SharpPlot; sp.Heading = "Histogram with Normal curve"; sp.HistogramStyle = HistogramStyles.SurfaceShading|HistogramStyles.Risers| HistogramStyles.NormalCurve; sp.SetFillStyles(FillStyle.Halftone); sp.SetPenWidths(2); sp.SetXRange(3,18); sp.ClassInterval = 3; sp.SetXTickMarks(3); sp.DrawHistogram(threedice); Worked Examples |