R:箱线图-如何向下移动X轴标签? [英] R: Boxplot - how to move the x-axis label down?

查看:322
本文介绍了R:箱线图-如何向下移动X轴标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#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"))

是我的代码,它可以完成工作,但是当我旋转x轴标签时,会阻塞x轴标题. 你们中有人知道下移标题的方法吗?

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.

谢谢. Mathias

Thanks. Mathias

推荐答案

我将设置xlab="",然后使用mtext将其添加.因此,您可以使用line参数将其放置在标签下方的底部,或者完全更改侧面以将其放置在图形的顶部.

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)

这篇关于R:箱线图-如何向下移动X轴标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆