Iâm trying to plot a trendline for a Plotly scatterplot and I canât figure out how to get the trendline to appear over the scatter. Below is the code that I used:
import plotly.express as px
fig = px.scatter(df, x=âPercentage_LIFTâ, y=âAverage_Daily_Contactsâ, title=âPercent on LIFT vs Average Daily Contactsâ, trendline = âolsâ, trendline_color_override=âredâ)
fig.show()
The trendline appears below the scatter, which you can see below:
How do I get the trendline to appear above the scatter?