R: Boxplot - how to shift the X axis label?

#RGR ~ Treatment:Geno boxplot
fit <- aov(Total.RGR~Treatment:Geno, data=For.R)
summary(fit)
t <- TukeyHSD(fit)
t
boxplot(Total.RGR~Treatment:Geno, 
data=For.R,las=2,ylim=c(-20,100),xlab="Treatment:Geno",ylab="RGR (mg/day)")
text(1:8, 95 ,c("a","ac","a","a","a","bd","bcd","ad"))

      

This is my code, it does its job, but when I rotate my x-axis labels, it obstructs the x-axis title. Does anyone of you know how to move the title down?

Image

It should be easy, but I can't find anything in the reference.

Thank you. Mathias

+1


source to share


1 answer


I would install xlab=""

and add it after use mtext

. So, either you play with the parameter line

and set it down below your sheets. Or change the side completely to place it at the top of the graph.



   mtext("Treatment:Geno", side=1, line=5)
   mtext("Treatment:Geno", side=3)

      

+3


source







All Articles