plt.figure(figsize=(10,10)) # Getting the Upper Triangle of the co-relation matrix corr = train_df.corr() matrix = np.triu(corr) sns.heatmap(corr, mask=matrix, annot=True, annot_kws={"size": 8}, cmap="coolwarm", fmt='.1g');
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter