This post aims to show how to plot a basic correlation matrix using seaborn.
Seaborn allows you to make a correlogram or correlation matrix really easily. Correlogram is awesome for exploratory analysis: it makes you quickly observe the relationship between every variable of your matrix. It is easy to do it with seaborn: just call the pairplot()
function!
# libraries
import seaborn as sns
import matplotlib.pyplot as plt
# load data set
df = sns.load_dataset('iris')
# Basic correlogram
sns.pairplot(df)
plt.show()
🚨 Grab the Data To Viz poster!
Do you know all the chart types? Do you know which one you should pick? I made a decision tree that answers those questions. You can download it for free!
Copyright © the Python Graph Gallery 2024
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4