# Re: [R] boxplot with text and symbols on x

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Thu, 29 May 2008 07:13:06 -0400

On Thu, May 29, 2008 at 4:40 AM, Birgit Lemcke <birgit.lemcke_at_systbot.uzh.ch> wrote:
> Hello R-user community!
>
> I am running R 2.7.0 on a Power Book (Tiger). (I am still R and statistics
> beginner)
>
> I did the following :
>
> pdf("InLnegthMaxHomogeneity.pdf")
> boxplot(inflorescence_length_Max~Sex, main="Bartletts Homogeneity for
> inflorescence length",data=FemMal_Sex)
> Homo<-bartlett.test(FemMal_Sex\$inflorescence_length_Max,FemMal_Sex\$Sex)
> text( 2, 500, "Bartlett's K-squared=", col='red',adj = c(1,0) )
> text( 2, 500, round(Homo\$statistic,digits=5), col='red' ,adj = c(0,0))
> text( 2, 480, "df=", col='red',adj = c(1,0) )
> text( 2, 480, Homo\$parameter, col='red' ,adj = c(0,0))
>
> text( 2, 460, "p-value=", col='red', adj = c(1,0))
> text( 2, 460, round(Homo\$p.value,digits=5), col='red', adj = c(0,0))
>
> dev.off()
>
>
> As I am still not very good in R, I guess it is not the easiest way to
> implement the text and it was kind of fiddling around to find the right
> position for the text.
> I would be glad if somebody would have an easier solution.
>
> My second question is about adding symbols (usual male and female symbol) to
> the x-axis to label the boxes.
>
> I would be very glad if somebody could help mw with this.
>
>
> Greets
>
> Birgit
>
> Birgit Lemcke
> Institut für Systematische Botanik
> Zollikerstrasse 107
> CH-8008 Zürich
> Switzerland
> Ph: +41 (0)44 634 8351
> birgit.lemcke_at_systbot.uzh.ch
>
> 175 Jahre UZH
> «staunen.erleben.begreifen. Naturwissenschaft zum Anfassen.»
> Weitere Informationen http://www.175jahre.uzh.ch/naturwissenschaft
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help