python中画带置信区间的拟合线几种绘制方式

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')

转自:https://www.jianshu.com/p/4d7d7e4ff4f8 

你可能感兴趣的:(python)