[R] Boxplot Labels

John Kane jrkrideau at inbox.com
Tue Apr 9 17:44:53 CEST 2013


  p <- boxplot(dat1$ave, data= dat1, main= "Average Size", yaxt = "n")
  text(1.1, , y  = max(dat1$ave), label = "26", cex = .7)
  
but I don't understand 
 #I would like the labels that appear in the boxplot to be DATA$num values.

You want 26 values potted?



John Kane
Kingston ON Canada


> -----Original Message-----
> From: aguitatierra at hotmail.com
> Sent: Tue, 9 Apr 2013 16:17:01 +0100
> To: r-help-bounces at r-project.org, r-help at r-project.org
> Subject: [R] Boxplot Labels
> 
> #Dear all,
> 
> #Could anyone help me with the following?
> #DATA
> num <- as.numeric(seq(100:125))
> ave <- c(0.5, 1, 1.6, 2, 2, 2.3, 2.5, 2.4, 3, 3.2, 3.3, 4, 4.8, 3.5, 2.7,
> 3.1, 2.8, 3.5, 4.1, 2.0, 2.5, 2.1, 3.4, 2.5, 2.6, 7)
> DATA <- data.frame(cbind(num, ave))
> rm(num, ave)
> 
> #BOXPLOT
> x11()
> bp <- boxplot(DATA$ave, data= DATA, main= "Average Size")
> identify(x= bp$group, y= bp$out, labels= DATA$num, cex = 0.7)
> #I would like the labels that appear in the boxplot to be DATA$num
> values.
> #When I identify the outlier it appears a "1" when I would like to appear
> a "26"
> 
> #Do you have any idea of how I could do that?
> 
> #Many thanks!
> #Bea
> 	[[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.

____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!



More information about the R-help mailing list