Skip to content

Trendline with equation #185

Answered by adamerose
brianjoubert asked this question in Q&A
Jan 12, 2022 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hi @brianjoubert , I just tried it on a scatter plot and it works for me. You may have been using a graph that doesn't support the trendline argument? Please check this reference https://plotly.com/python-api-reference/generated/plotly.express.scatter.html#plotly.express.scatter, and if that isn't the reason, create a minimum reproducible example that I can look into.

Or are you saying the trendline works but you're just missing the equation showing on the plot? That would be a new feature request to make on the Plotly Express repo. In the meantime you would need to calculate it yourself and manually create a textbox on the Plotly figure

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@brianjoubert
Comment options

@adamerose
Comment options

@brianjoubert
Comment options

@adamerose
Comment options

Answer selected by brianjoubert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants