2.1.7.6.Regression Plots
0. Regression Plots的繪圖種類
1. 使用library
import seaborn as sns%matplotlib inlinetips = sns.load_dataset('tips')
tips.head()
2.lmplot


Last updated
import seaborn as sns%matplotlib inlinetips = sns.load_dataset('tips')
tips.head()


Last updated
sns.lmplot(x='total_bill', y='tip', data=tips)sns.lmplot(x='total_bill', y='tip', data=tips, hue='sex', markers=['o', 'v'], scatter_kws={'s':100})sns.lmplot(x='total_bill', y='tip', data=tips, col='sex', row='time') plt.figure(figsize=(11,7))
sns.lmplot(y='int.rate',x='fico',data=df) plt.figure(figsize=(11,7))
sns.lmplot(y='int.rate',x='fico',data=df,hue='credit.policy',palette='Set1') plt.figure(figsize=(11,7))
sns.lmplot(y='int.rate',x='fico',data=df,hue='credit.policy',col='not.fully.paid',palette='Set1)