使⽤aborn绘制回归曲线,设置图例
import numpy as np甲癣的症状图片
import os
那种感觉
import matplotlib.pyplot as plt
import aborn as sns
import pandas as pd
from scipy import stats等候别人说什么礼貌用语
五子棋技巧
plt.plot(data_fx, data_fx, label='Reference Line', color='red')
# info_dict = {'Label': data_fx, 'Prediction': pred_fx}
# info_df = pd.DataFrame(info_dict)
# h = sns.jointplot(x='Label', y='Prediction', data=info_df, kind='hist')
plt.title(f'All data\nPearson correlation coefficient: {r:.2f}')
plt.xlabel('Label')
波尔多斯plt.ylabel('Prediction')
# # sns.histplot(b, color='blue', label='pred')
# # sns.histplot(a, color='yellow', label='label')
我要学舞蹈plt.legend(loc='best')
plt.show()顾姓男孩名字大全
需要注意的是,绘制回归曲线有很多种函数可以选择,但⼤部分是figure level的函数,不⽅便修改图例regplot的图例是试出来的,太难画了火影名言