Skip to content

Instantly share code, notes, and snippets.

@berendgort
Created March 11, 2022 13:28
Show Gist options
  • Save berendgort/a731cf8fb354381d97d2e5ed3e23ebd1 to your computer and use it in GitHub Desktop.
Save berendgort/a731cf8fb354381d97d2e5ed3e23ebd1 to your computer and use it in GitHub Desktop.
corr_matrix = pd.DataFrame(X).corr()
ax = sns.heatmap(
corr_matrix,
xticklabels=True,
yticklabels=True,
vmin=-1, vmax=1, center=0,
cmap=sns.diverging_palette(20, 220, n=200),
square=True
)
ax.set_xticklabels(
ax.get_xticklabels(),
rotation=90,
horizontalalignment='right'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment