| |||||
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 > BoxPlot > Simple Boxplot of barley data Simple Boxplot of barley dataA selection of simple Box-and-Whisker charts are developed here, all using a ‘classic’ dataset from the 1930s showing barley yields at various farms in Canada. The trials were made at 6 farms over 2 years, with 10 varieties of barley, giving 120 data-points in total. The entire dataset is shown for reference in the glossary. The object of the trial was to see what the significant effects were, and the boxplot is an ideal way to explore relationships between variables. You might also check on the histograms of various subsets of the data, maybe using a Multiple chart to split the data by various criteria. This chart simple takes the entire yield vector, and determines the ‘shape’ of the distribution. SharpPlot sp = new SharpPlot; years = (int[])_barleyyear.Clone(); yield = (double[])_barleydata.Clone(); farm = (string[])_barleyfarm.Clone(); sp.Heading = "Barley Yield (uncategorised)"; sp.SetColors(Color.Orange); sp.XAxisStyle = XAxisStyles.ForceZero; sp.YAxisStyle = YAxisStyles.NoAxis; sp.BoxPlotStyle = BoxPlotStyles.Horizontal; sp.DrawBoxPlot(yield); Worked Examples |