【问题标题】:Changing the size of axis title in R?更改 R 中轴标题的大小?
【发布时间】:2018-03-10 20:42:04
【问题描述】:

我已经为箱线图编写了这段代码。我正在更改 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)

【问题讨论】:

    标签: r plot boxplot axis-labels


    【解决方案1】:

    似乎您正在使用 mtext 来放置轴标签。在这种情况下,您需要更改 mtext 内的 cex 参数:

    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)
    

    【讨论】:

      猜你喜欢
      • 2011-07-18
      • 2018-07-20
      • 2013-02-03
      • 1970-01-01
      • 1970-01-01
      • 2021-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多