【问题标题】:How do i get the 2.5 to be subscript without changing the output of the brackets? ggplot axis labels如何在不更改括号输出的情况下将 2.5 设为下标? ggplot 轴标签
【发布时间】:2021-11-14 09:41:25
【问题描述】:

我在 ggplot 中有以下 y 轴标签的代码

y = bquote('PM2.5 ('*µg~m^-3*')')

我希望 2.5 为下标,但不知道如何同时将括号中的部分保持为我想要的方式。

我希望 y 轴标签上 R 中的输出如下所示:

【问题讨论】:

    标签: r ggplot2 label subscript


    【解决方案1】:

    我们可能会使用

    plot(1, 1, main = bquote('PM'[2.5]~'('*µg~m^-3*')'))
    

    -输出

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-08-11
      • 2013-06-24
      • 2016-12-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多