⏱ Quick start
Once more, the
Seaborn library is here to build a high quality correlogram with a few lines of code only.🔥
# library & dataset import seaborn as sns df = sns.load_dataset('iris') import matplotlib.pyplot as plt # Basic correlogram sns.pairplot(df) sns.plt.show()
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.
As usual it is totally possible to build the chart with Matplotlib, but requires to write a bit more code. Basically, it is done using the subplots() function to create the grid, and next building a loop to add the charts one by one.