A notebook seaborn test

Just to have examples in the gallery of notebooks

# Author: Michael Waskom
# License: BSD 3 clause

from __future__ import division, absolute_import, print_function
import numpy as np
from scipy.stats import kendalltau
import seaborn as sns
import matplotlib.pyplot as plt

sns.set(style="ticks")

rs = np.random.RandomState(11)
x = rs.gamma(2, size=1000)
y = -.5 * x + rs.normal(size=1000)

sns.jointplot(x, y, kind="hex", stat_func=kendalltau, color="#4CB391")
../../_images/sphx_glr_plot_seaborn_notebook_001.png

A new block in the notebook to have different styles

sns.set(style="whitegrid", palette="pastel", color_codes=True)

# Load the example tips dataset
tips = sns.load_dataset("tips")

# Draw a nested violinplot and split the violins for easier comparison
sns.violinplot(x="day", y="total_bill", hue="sex", data=tips, split=True,
               inner="quart", palette={"Male": "b", "Female": "y"})
sns.despine(left=True)
../../_images/sphx_glr_plot_seaborn_notebook_002.png

Total running time of the script: ( 0 minutes 0.809 seconds)

Gallery generated by Sphinx-Gallery