R: Boxplot - how to move the x-axis label down?
15,359
I would set xlab=""
and add it afterwards using mtext
. So, either you play with line
parameter an put it the bottom under your lables Or change completely the side to put it in the top of the plot.
mtext("Treatment:Geno", side=1, line=5)
mtext("Treatment:Geno", side=3)
Author by
Mathias
Updated on June 05, 2022Comments
-
Mathias almost 2 years
#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"))
Is my code, it does the job, but when I rotate my x-axis labels the obstruct the x-axis title. Does any of you know of a way to move the title down?
It must be easy but I cant find anything in the reference.
Thanks. Mathias
-
Mathias over 9 yearsThanks a lot. It seems so easy now, I like R, but i find that figuring out simple stuff can be so hard.