Demo Statistical Data Visualization with seaborn


In [1]:
%matplotlib inline

import seaborn as sns
import matplotlib.pyplot as plt

sns.set(style="ticks")

df = sns.load_dataset("iris")
sns.pairplot(df, hue="species")


/home/appuser/.conda/envs/dpyml/lib/python3.6/site-packages/scipy/stats/stats.py:1713: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
  return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval
Out[1]:
<seaborn.axisgrid.PairGrid at 0x7f8f1f3a6f98>

In [2]:
ax = sns.boxplot(x="species", y="petal_width", data=df)



In [3]:
sns.distplot(df.petal_width)


Out[3]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f8f1aa45a90>

In [4]:
sns.jointplot(x="petal_width", y="petal_length", data=df)


Out[4]:
<seaborn.axisgrid.JointGrid at 0x7f8f1a9efdd8>