Seaborn Figure Backgound Setting¶
import pandas as pd
from IPython.display import display
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
# load_data
iris = pd.melt(sns.load_dataset('iris'), "species", var_name="measurement")
display(iris.head())
Default¶
sns.stripplot(x="measurement", y="value", hue="species", data=iris, jitter=0.2, dodge = True, linewidth=0.5, edgecolor = "white")
plt.show()
White¶
sns.set_style('white')
sns.stripplot(x="measurement", y="value", hue="species", data=iris, jitter=0.2, dodge = True, linewidth=0.5, edgecolor = "white")
plt.show()
Whitegrid¶
sns.set_style('whitegrid')
sns.stripplot(x="measurement", y="value", hue="species", data=iris, jitter=0.2, dodge = True, linewidth=0.5, edgecolor = "white")
plt.show()
Dark¶
sns.set_style('dark')
sns.stripplot(x="measurement", y="value", hue="species", data=iris, jitter=0.2, dodge = True, linewidth=0.5, edgecolor = "white")
plt.show()
Darkgrid¶
sns.set_style('darkgrid')
sns.stripplot(x="measurement", y="value", hue="species", data=iris, jitter=0.2, dodge = True, linewidth=0.5, edgecolor = "white")
plt.show()
Ticks¶
ticks on axes
sns.set_style('ticks')
sns.stripplot(x="measurement", y="value", hue="species", data=iris, jitter=0.2, dodge = True, linewidth=0.5, edgecolor = "white")
plt.show()
Reference¶
- https://seaborn.pydata.org/tutorial/aesthetics.html