#104 Seaborn Themes

The Seaborn python library is well known for its grey background and its general styling. However, note that a few other built in style are available: darkgrid, white grid, dark, white and ticks. Here is how to call them:


# library
import seaborn as sns
import numpy as np

# Data
data = np.random.normal(size=(20, 6)) + np.arange(6) / 2

# Proposed themes: darkgrid, whitegrid, dark, white, and ticks

sns.set_style("whitegrid")
sns.boxplot(data=data)
plt.title("whitegrid")

sns.set_style("darkgrid")
sns.boxplot(data=data);
plt.title("darkgrid")

sns.set_style("white")
sns.boxplot(data=data);
plt.title("white")

sns.set_style("dark")
sns.boxplot(data=data);
plt.title("dark")

sns.set_style("ticks")
sns.boxplot(data=data);
plt.title("ticks")

Leave a Reply

Your email address will not be published.