✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
📊 Dash 2.0 is Arriving. Register here.

Plotting best fit line through medians of boxes

HI,

I want to plot the best fit line through the medians. Is there a way to do it? Or get the medians somehow…

We don’t expose a way to do that automatically in plotly.js. But you can always fit the data using another JS library and add the result to your graph using a separate trace.

Is there a way to programmatically get the data?

here’s how: https://codepen.io/etpinard/pen/gKmQYR?editors=0010

how to do it in python?