Biology, images, analysis, design...
Use/Abuse Principles How To Related
"It has long been an axiom of mine that the little things are infinitely the most important" (Sherlock Holmes)

Search this site



Just a note

The following code produces much the same sort of result for the boxplots using R.

  • You can obtain box plots of several variables in one graph. We have obtained boxplots of two variables (in this case wta and wtb) by using boxplot(wta,wtb)

  • As you would expect, the box and center line indicates the location of the lower and upper quartiles - and the median.

    However, by default, these whiskers do not indicate the range of variable y. Instead they extend to whichever value lies just within 1.5 the interquartile range beyond the lower and upper quartile. Any values falling outside that range are plotted as points. If the values are 'normally' distributed, on average, this range encloses approximately 99.3% of the sample. Because we wanted the whiskers to show maximum and minimum, we set the range argument of boxplot to zero with range=0.

  • Labels and colours are added in the usual way. The instruction names = c('Herd A', 'HerdB') adds the variable names under each box. The instruction boxwex=0.5 reduces the width of the plots from 0.8 which is the default value suitable for single plots.