如何在python中绘制趋势线以进行多元线性回归

时间:2018-11-30 20:26:38

标签: python-3.x

我想为多元线性回归画一条趋势线,但是我不确定该怎么做。到目前为止,这是我的代码:

import numpy as np


import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline

incu = pd.read_excel('incubation1.xlsx')

plt.figure(figsize=(8,6))
ax = sns.scatterplot(x = "pH", y = "Al", size = "CEC", alpha=1, hue= "Ca", sizes=(10, 400),data = incu)

我想在散点图中添加趋势线。

0 个答案:

没有答案