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)
sns.plt.show()

Seaborn logoCorrelogram 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.

Note that a correlogram is an aggregate of scatterplots and histograms. Most of the customizations described in those related sections can be applied here.

Contact

👋 This document is a work by Yan Holtz. Any feedback is highly encouraged. You can fill an issue on Github, drop me a message onTwitter, or send an email pasting yan.holtz.data with gmail.com.

Violin

Density

Histogram

Boxplot

Ridgeline

Scatterplot

Heatmap

Correlogram

Bubble

Connected Scatter

2D Density

Barplot

Spider / Radar

Wordcloud

Parallel

Lollipop

Circular Barplot

Treemap

Venn Diagram

Donut

Pie Chart

Dendrogram

Circular Packing

Line chart

Area chart

Stacked Area

Streamgraph

Map

Choropleth

Hexbin

Cartogram

Connection

Bubble

Chord Diagram

Network

Sankey

Arc Diagram

Edge Bundling

Colors

Interactivity

Animation with python

Animation

Cheat sheets

Caveats

3D