小编Poz*_*oza的帖子

使用 ggcorrplot 包更改相关图对角线的方向 - 如果输入“upper”或“lower”

我对这里的问题还有一个后续问题。

This person wanted to make a correlation plot with ggcorrplot from the package ggcorrplot. However, they wanted to have the diagonal going down the matrix instead of up from left to right. So, they wanted to make the graph look like the correlation matrix that they used as input:

library(ggcorrplot)
data(mtcars)
corr.mat <- cor(mtcars[, c("mpg", "disp", "hp", "drat", "wt", "carb")])
ggcorrplot(corr.mat)
print(corr.mat)
Run Code Online (Sandbox Code Playgroud)

The following solution was given, which works fine, as long as you use the specification type …

r correlation ggcorrplot

1
推荐指数
1
解决办法
755
查看次数

标签 统计

correlation ×1

ggcorrplot ×1

r ×1