facet by trend (e.g. columns by pos/neg slope or bins of slope value ranges)
apply text label (once) to a scatter series, preferable the trend line itself (potentially angled with the trendline—just want to see how this looks in some contexts)
I really this might be a “stage it in pandas” thing but curious if others have already done things like this and have examples/snippets. thx!
Hi @AIMPED , thanks for your reply. I tinkered with this a bit more in the meantime.
I figured out an MVP for this part. I will try to remember to share if I get around to cleaning up the code. Image attached. Basically I
pulled the rsquared value from from px_fit_results()
pulled the sign from alpha
merged this result into the data for the viz
faceted on this new field
Not necessarily something useful in many cases but for the data I was exploring, I wanted to at least try breaking up some of the series by trend. I am not totally happy with this but it’s a start.
This is not quite what I wanted (main intent is to place the annotations procedurally in a neat way, similar to force simulation here (Plot: Slope chart / Observable | Observable) but it’s a start. The rotation is most to make the annotations ‘stick’ to the relevant trendline esp. if placed on the chart area (here they are pushed over like tickmarks…not perfect obviously).