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”)
The trendline appears below the scatter, which you can see below:
How do I get the trendline to appear above the scatter?