我试图用GGpairs创建一个相关矩阵,散射图按组(reg或reg)着色。在上角绘制的相关值没有对齐,正如您在这里看到的图像中的Cor、reg和reg值不对齐。

我使用的代码如下:
ggpairs(data=dat4,
columns=1:5,
title="correlation matrix",
mapping= aes(colour = irregular),
lower = list(
continuous = "smooth",
combo = "facetdensity",
mapping = aes(color = irregular)))数据在这里:可复制数据
有什么建议吗?谢谢,谢谢!
卡盘
发布于 2016-11-11 06:41:57
这似乎是可行的:
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)))

https://stackoverflow.com/questions/40540363
复制相似问题