ggcorrplot icon indicating copy to clipboard operation
ggcorrplot copied to clipboard

Control y and x axis variables

Open qalid7 opened this issue 6 years ago • 8 comments

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: image 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 avatar May 04 '18 16:05 qalid7

@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 avatar May 05 '18 18:05 ffineis

@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 avatar May 07 '18 19:05 qalid7

@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 avatar May 07 '18 21:05 Chia-KaiYang

@Chia-KaiYang oh! that simple! Thanks so much man

qalid7 avatar May 08 '18 09:05 qalid7

@qalid7 no worries, I had experience on similar issues before :)

Chia-KaiYang avatar May 08 '18 10:05 Chia-KaiYang

@kassambara I think this is also resolved!

IndrajeetPatil avatar Nov 28 '20 11:11 IndrajeetPatil

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 avatar Jan 28 '22 10:01 alexandruioanvoda

@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)

acjmmartin avatar Oct 26 '22 16:10 acjmmartin