【问题标题】:Adjusting font.lab to get bold in plotmath expression?调整 font.lab 以在 plotmath 表达式中加粗?
【发布时间】:2013-03-14 02:05:33
【问题描述】:

使用以下代码,xlab 将是粗体,但 ylab 不是。你能帮帮我吗

pdf()
par(font.axis=2, font.lab=2, cex.lab=1.2, cex.axis=1.2, cex.sub=1.2,
    mfrow=c(2,2), mar = c(5,6,3,1) + 0.1)
hist(ADAM, axes=F, main="", ylim=c(0,1000000), xlab="",
     ylab= expression(paste("number(",x10^6,")",sep="")))
axis(1,at=seq(0,1,0.2), labels=seq(0,1,0.2))
axis(2, at=seq(0,1000000,500000), labels=seq(0,1, by=0.5), las=2)
dev.off()

谢谢

【问题讨论】:

    标签: r plotmath


    【解决方案1】:

    如果您使用函数expression()font.lab=2 不会影响轴标签。您应该在expression() 中使用函数bold() 来获得粗体。

    hist (ADAM, axes=F, main="", ylim=c(0,1000000), 
        xlab="", ylab= expression(bold(paste("number(",x10^6,")",sep=""))))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-06
      • 2018-05-24
      • 2013-08-09
      • 2021-02-20
      • 1970-01-01
      • 2014-05-05
      • 2016-01-13
      • 2020-03-23
      相关资源
      最近更新 更多