ggcorrplot
ggcorrplot copied to clipboard
Control y and x axis variables
I've a large matrix and perhaps I don't need to show the correlations between each and every variable. Instead, for comparison purposes between groups, I'd rather have a set of variables on the x-axis and the same on y-axis. Something like this figure:
https://www.researchgate.net/figure/Heatmap-showing-pearson-correlation-coefficients-between-security-indices-vs-features_fig2_233836152
It looks like an R figure but I have failed to find a nice way of producing something like this. Any ideas?
@qalid7 I think this is the same feature request as https://github.com/kassambara/ggcorrplot/issues/5 - you just want rectangular correlation heatmaps, right? Package maintainer has agreed to work on it
@ffineis thanks! I will surely be waiting for that ...
Do you have any idea how to do this otherwise? I may need it sooner actually. It's seems like a lot simpler problem than the ones already presented in these packages.
@qalid7 How about you calculate the m X n (m != n)
correlation matrix yourself and plot it with ggcorrplot(m X n matrix)
? It works at my side.
@Chia-KaiYang oh! that simple! Thanks so much man
@qalid7 no worries, I had experience on similar issues before :)
@kassambara I think this is also resolved!
Really cool package, @kassambara!
@Chia-KaiYang I'm not sure if that works with the rest of the features. For example, when using the P-val plotting feature (with non-rectangular corr matrices), it throws an error*, while without, it works just fine.
*
No id variables; using all as measure variables
Error in FUN(X[[i]], ...) : object 'Var1' not found
@alexandruioanvoda were you able to fix your Error in FUN(X[[i]], ...) : object 'Var1' not found
error? I am getting the same error when adding a p.mat matrix (even though it's square)