Regression plot Plotly in Python

Viewed 81

I am wondering if plotly provides any way to to regression plots which show the scattering of the residues.

It should look similarly as if seaborn was used:

import seaborn as sns; sns.set_theme(color_codes=True)
tips = sns.load_dataset("tips")
ax = sns.regplot(x="total_bill", y="tip", data=tips)
1 Answers

try this: use trendline parameters for similar expression as sns regplot.

import plotly.express as px
fig = px.scatter(tips,x = 'total_bill',y= 'tip', trendline='ols',trendline_color_override='red')
Related