我已经为盒子图写了这段代码。我正在改变x和y轴的轴标题的大小,但它没有改变。我寻找各种答案并尝试但没有得到任何改变。有人可以帮帮我吗?
Sradmi<-read_xlsx("Boxplot.xlsx", sheet = 16)
par(family="serif")
boxplot(Sradmi, main ="Solar radiation (miroc_miroc5)", cex.axis=1.2, cex.lab=2, cex.main=1, col="red", ylim = c(10, 30), ann=FALSE)
mtext(side = 1, text = expression(bold("Months")),line=2.5)
mtext(side = 2, text = expression(bold("Solar radiation (MJ/m"^"2"*")")), line=2.5)
答案 0 :(得分:0)
好像你正在使用mtext来放置轴标签。在这种情况下,您需要更改mtext
:
boxplot(Sradmi, main ="Solar radiation (miroc_miroc5)", cex.axis=1.2, cex.lab=2, cex.main=1, col="red", ylim = c(10, 30), ann=FALSE)
mtext(side = 1, text = expression(bold("Months")),line=2.5, cex=1.2)
mtext(side = 2, text = expression(bold("Solar radiation (MJ/m"^"2"*")")), line=2.5, cex=1.2)