1

I have a dataframe and want to identify how the variables are correlated. I can get the correlation matrix easily using – df.corr(). I know I can easily plot the correlation matrix using plt.matshow(df.corr()) or seaborn's heatmap, but I'm looking for something like this - graph enter image description here taken from here. In this image, the thicker the line connecting the variables is, the higher the correlation.

I did a few searches on stack and elsewhere but all of them are correlation matrices where the values have been replaced by colors. Is there a way to achieve the linked plot?

Mad Physicist
  • 107,652
  • 25
  • 181
  • 264
Clock Slave
  • 7,627
  • 15
  • 68
  • 109

0 Answers0