I have made a pairplot using the Iris dataset using the code below, but the regression lines show for each of the three iris flowers, rather than for the dataset as a whole (which is what I am looking for). I want each segment of pairplot to color each data point according to which category of Iris it came from, but I want the regression line to be for the whole sample rather than having three separate regression lines within each segment. Is this possible?
(df is my DataFrame created from a downloaded .csv file for the dataset.)
iris_pairplot = sns.pairplot(df, hue = "variety", palette="Dark2", height=3, aspect=1, corner=True, kind="reg")
iris_pairplot.fig.suptitle("Pairplot of traits for full Iris sample", fontsize = "xx-large")
plt.tight_layout()
plt.savefig('iris_pairplot.png')
I have tried to use .regplot() but that seems to be for individual scatterplots as opposed to a pairplot?