我对这里的问题还有一个后续问题。
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 …