Hi Andre, You can do it manually like this: testmat<-matrix(rnorm(90),ncol=3) boxplot(testmat,ylim=c(-3,4)) library(plotrix) draw.arc(1.5,2,0.5,0,pi,col=1) draw.arc(2.5,2,0.5,0,pi,col=1) boxed.labels(c(1.5,2.5),c(3.3,3.3),c("**","***"),border=NA)
Obviously you would have to nudge the arcs and labels around to match your plot. I don't know of a function that does this automatically. Also if your aspect ratio is far from 1, the arcs won't be circular. It is possible to write a function that will use the return values from boxplot to display rectangular brackets above the boxplots and then put the asterisks or whatever else you want on the top lines. Jim On Sat, Aug 15, 2015 at 5:46 AM, André Luis Neves <andrl...@ualberta.ca> wrote: > Dear everyone, > > Would like to know how to add asterisks and arcs that indicate a subgroup > comparison above box plots to denote statistical diference. > > Thank you. > > Andre > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.