Skip to content
Prev 353651 / 398506 Next

Help

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 <andrluis at ualberta.ca> wrote: