import pandas as pd
%matplotlib inline
import random
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.DataFrame()
df['x'] = random.sample(range(1, 100), 25)
df['y'] = random.sample(range(1, 100), 25)
df.head()
x | y | |
---|---|---|
0 | 14 | 52 |
1 | 88 | 92 |
2 | 39 | 69 |
3 | 19 | 98 |
4 | 60 | 76 |
sns.lmplot('x', 'y', data=df, fit_reg=False)
<seaborn.axisgrid.FacetGrid at 0x10dc2b1d0>
sns.kdeplot(df.y)
<matplotlib.axes._subplots.AxesSubplot at 0x10c30e050>
sns.kdeplot(df.y, df.x)
<matplotlib.axes._subplots.AxesSubplot at 0x10c5536d0>
sns.distplot(df.x)
<matplotlib.axes._subplots.AxesSubplot at 0x10b669550>
plt.hist(df.x, alpha=.3)
sns.rugplot(df.x);
sns.boxplot([df.y, df.x])
<matplotlib.axes._subplots.AxesSubplot at 0x10a5c9b50>
sns.violinplot([df.y, df.x])
<matplotlib.axes._subplots.AxesSubplot at 0x10dca4b50>
sns.heatmap([df.y, df.x], annot=True, fmt="d")
<matplotlib.axes._subplots.AxesSubplot at 0x10dab5110>
sns.clustermap(df)
<seaborn.matrix.ClusterGrid at 0x10de304d0>