Re: [R] adding the mean and standard deviation to boxplots

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Mon, 4 Feb 2008 11:59:32 -0500

Not precisely what you asked for but see the notch= argument to boxplot for a graphic measure of variability. If you simply wish to print certain statistics below the numbers already on the X axis then see:

https://stat.ethz.ch/pipermail/r-help/2008-January/152994.html

On Feb 4, 2008 10:41 AM, Tom Cohen <tom.cohen78_at_yahoo.se> wrote:
> Dear list,
>
> How can I add the mean and standard deviation to each of the boxplots using the example provided in the boxplot function?
>
> boxplot(len ~ dose, data = ToothGrowth,
> boxwex = 0.25, at = 1:3 - 0.2,
> subset = supp == "VC", col = "yellow",
> main = "Guinea Pigs' Tooth Growth",
> xlab = "Vitamin C dose mg",
> ylab = "tooth length", ylim = c(0, 35), yaxs = "i")
> boxplot(len ~ dose, data = ToothGrowth, add = TRUE,
> boxwex = 0.25, at = 1:3 + 0.2,
> subset = supp == "OJ", col = "orange")
> legend(2, 9, c("Ascorbic acid", "Orange juice"),
> fill = c("yellow", "orange"))
>
> Thanks for any help,
> Tom
>
>
> ---------------------------------
>
> Jämför pris på flygbiljetter och hotellrum: http://shopping.yahoo.se/c-169901-resor-biljetter.html
> [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 04 Feb 2008 - 17:02:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 04 Feb 2008 - 17:30:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive