Correlogram

A correlogram or correlation matrix allows to analyse the relationship between each pair of numeric variables of a matrix. The correlation is visualised as a scatterplot. The diagonal represents the distribution of each variable with a histogram or a density plot.
⏱ Quick start
Once more, the Seaborn library is here to build a high quality correlogram with a few lines of code only.🔥
Note that all the stuff you learned in the scatterplotand histogram sections can be used here.
# library & dataset
import seaborn as sns
df = sns.load_dataset('iris')
import matplotlib.pyplot as plt
# Basic correlogram
sns.pairplot(df)
plt.show()
Correlogram with Seaborn
Seaborn is definitely the best way to build a correlogram with python. It provides a pairplot() function that handles most of the work for you. The examples below give an overview of the customizations you can apply to it to suits your need.


