[R] boxplot names italic

Wolf Sarah wolfsa at student.ethz.ch
Tue Sep 25 10:08:13 CEST 2012


Hello

I have two boxplots and want the names to be in italic, which works fine, except that the second name (Sinapis) is raised, compared to the first name:

bicran<-c(0.55,0.25,0.6,0.83,0.11,0,0.67,1.36,0.9,1.09)
bicsin<-c(0.09,0.53,0.45,0.38,1.18,0.45,0.78,1.17,1.22,1.4)
ran.text<-expression(italic(Ranunculus))
sin.text<-expression(italic(Sinapis))
boxplot(bicran, bicsin, names=c(ran.text, sin.text))
mtext("(N=10)", side=1,line=1, adj=0.43,cex=0.9)
mtext("(N=10)",side=1,line=1,adj=0.9, cex=0.9)


Is there anything I can do against that? With the names in regular letters there is no problem, the names show up on the same level:

boxplot(bicran, bicsin, names=c("Ranunculus", "Sinapis"))

Thanks and cheers, Sarah



More information about the R-help mailing list