plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Trendline returns empty dataframe if color is set

Open Spider2themax opened this issue 8 months ago • 1 comments

fig = px.scatter(df, x="value1", y="value2", trendline="ols", color="colorcolor")

has resulted in:

results = px.get_trendline_results(fig)
print(results)

If I remove the color, then it works as expected. I don't know why a priori, trendline and color wouldn't be possible at the same time?

Spider2themax avatar Apr 11 '25 14:04 Spider2themax

hi @Spider2themax - the results of your print aren't showing up (or did you mean to include a screenshot?). Also, for tech support and "how-to" questions, please post in our community forum https://community.plotly.com/. Thank you - @gvwilson

gvwilson avatar Apr 14 '25 14:04 gvwilson