【问题标题】:GGpairs, correlation values are not alignedGGpairs,相关值未对齐
【发布时间】:2016-11-11 02:45:19
【问题描述】:

我正在尝试使用 GGpairs 创建一个相关矩阵,散点图按组(reg 或 ireg)着色。绘制在上角的相关值未对齐,正如您在此处的图像中看到的那样,Cor、reg 和 ireg 值未对齐。

我使用的代码是这样的:

ggpairs(data=dat4,
   columns=1:5, 
   title="correlation matrix",               
   mapping= aes(colour = irregular), 
   lower = list(
   continuous = "smooth",
   combo = "facetdensity",
   mapping = aes(color = irregular)))

数据在这里:replicatable data

有什么建议吗?谢谢谢谢!

查克

【问题讨论】:

    标签: r ggplot2 ggally


    【解决方案1】:

    这似乎有效:

    ggpairs(data=dat4,
            columns=1:5, 
            title="correlation matrix",               
            mapping= aes(colour = irregular), 
            lower = list(
              continuous = "smooth",
              combo = "facetdensity",
              mapping = aes(color = irregular)),
            upper = list(continuous = wrap("cor", size = 3, hjust=0.8)))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-24
      • 1970-01-01
      • 1970-01-01
      • 2021-08-05
      • 2021-11-18
      • 1970-01-01
      • 1970-01-01
      • 2019-05-04
      相关资源
      最近更新 更多