In [1]:
import seaborn as sns
import matplotlib.pyplot as plt
In [2]:
data=sns.load_dataset("tips")
data.head(5)
Out[2]:
In [3]:
sns.set(font_scale = 1.5,style = "white")
sns.lmplot(x = "total_bill",y = "tip", data = data)
plt.show()
In [4]:
sns.set(style="ticks")
# Load the example dataset for Anscombe's quartet
df = sns.load_dataset("anscombe")
df.head()
Out[4]:
In [5]:
# Show the results of a linear regression within each dataset
sns.lmplot(x="x", y="y", col="dataset", hue="dataset", data=df,
col_wrap=2, ci=None, palette="muted", height=4,
scatter_kws={"s": 50, "alpha": 1})
plt.show()