Python fit line drawn in the drawing with a confidence interval of several ways

import seaborn as sns
tips = sns.load_dataset("tips") #导入sns中自带的数据集
sns.regplot(x="total_bill",y="tip",data=tips)

 

import seaborn as sns
from matplotlib import pyplot as plt
tips = sns.load_dataset("tips") 
plt.figure(figsize=(5, 5))
sns.lmplot(x="total_bill",y="tip",hue="sex",data=tips)
plt.savefig(u'D://test2.pdf')

Transfer: https://www.jianshu.com/p/4d7d7e4ff4f8 

Guess you like

Origin blog.csdn.net/u_7890/article/details/88839573