Plant biology

Bar chart with error bars: mean ± 95% CI

Bar graph with error bars from mean, SD and n only: PlantGrowth plant weights with t-based 95% confidence intervals of the mean, as computed in R.

Open this example in the editorStart from scratch

02468ControlTreatment 1Treatment 2CategoryDried weight
Mean dried weight of three PlantGrowth groups (n = 10 each); error bars are 95% CIs of the mean from the supplied SD and n.

About this example

Papers and lab notebooks often report only a mean, an SD and a sample size for each group. This example supplies exactly that for R’s datasets::PlantGrowth (Dobson 1983): control mean 5.032 with SD 0.583, treatment 1 mean 4.661 with SD 0.794, treatment 2 mean 5.526 with SD 0.443, ten plants each.

The error bars show the 95% confidence interval of each mean: SEM = SD/√n, multiplied by the t quantile with n − 1 degrees of freedom (2.262 for n = 10). The control interval is 4.61 to 5.45. These are the same intervals Scientific Plot Maker draws from the thirty raw weights, and the downloadable R script recomputes them with qt().

Say in the legend what the error bars show; switching to SD or SEM changes their length a lot. The bars are supplied summaries: no raw data is shown and no test or p-value is computed. When you have the individual values, Scientific Plot Maker can draw them with the same interval.

Sources: R datasets::PlantGrowth — Dobson (1983)

The data

CategoryMeanSDn
Control5.0320.5830913783924056610
Treatment 14.6610.7936756964347032610
Treatment 25.5260.4425732833227860610

Supplied group means, SDs and n (from R datasets::PlantGrowth). Error bars are 95% CIs computed from the supplied SD and n; no significance test. Open the example, replace the data with your own, and export the figure as SVG, PDF, PNG or TIFF.

More examples