【问题标题】:How do you add a subtitle to a ggcorrplot?如何为 ggcorrplot 添加字幕?
【发布时间】:2018-10-18 12:40:53
【问题描述】:

有没有办法给 ggcorrplot 图形添加字幕?我已经阅读了文档,并且包中没有内置字幕功能。

library(ggcorrplot)
data(mtcars)
ggcorrplot(round(cor(mtcars), 1))

【问题讨论】:

    标签: r ggplot2 data-visualization ggcorrplot


    【解决方案1】:

    由于我们处理的是 ggplot 对象,我们可以简单地添加它们

    library(ggcorrplot)
    data(mtcars)
    ggcorrplot(round(cor(mtcars), 1)) + 
      labs(title = "My title",
           subtitle = "Here is a subtitle")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-07-27
      • 1970-01-01
      • 1970-01-01
      • 2014-01-29
      • 2019-12-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多