Color Guide to Seaborn Palettes

MoJoMoon
13 min readApr 19, 2020
Textile Colors from Pixabay

Seaborn arguably has one of the most rich visualization packages for python. It contains beautiful colors with powerful controls of parameters for a wide array of plots. While exploratory data analysis is one of the most important steps in the machine learning pipeline, interpretation and sharing of data can be considered an even more vital component of data science. In data visualization color is necessarily involved, and colors have an influence on their observer. In this guide we will display the full range of color palettes offered by Seaborn to give anyone intending to visualize data a comprehensive perspective of their options.

To begin, Seaborn has 170 different palette options. The entire list can be accessed easily after importing seaborn:

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline

In order to create a plot, you need data, so we will read in our dataset with pandas:

df = pd.read_csv(‘advertising.csv’)

Then create a plot with seaborn, here we set hue to the age_group column. Now use any single number or letter as a string value for palette:

sns.pairplot(df, hue=’age_group’, palette=’d’)

--

--

MoJoMoon

Educator of human and machine alike. Student of data science and machine learning.