我想为多元线性回归画一条趋势线,但是我不确定该怎么做。到目前为止,这是我的代码:
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)
我想在散点图中添加趋势线。