> How can I plot the number of observations per box in a boxplot.
> 

As usual, there's probably a more elegant solution, but this will do it:

p <- rnorm(100)
diddy <- boxplot(z)
text(1, diddy$stats[3]+0.4, paste("n = ", diddy$n))

see ?text and ?boxplot

-----
David Hewitt
Virginia Institute of Marine Science
http://www.vims.edu/fish/students/dhewitt/
-- 
View this message in context: 
http://www.nabble.com/boxplot-and-number-of-observations-per-box-tp15180615p15186107.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

Reply via email to