Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Box plot from array with redundant keys

Dear all,
This is my first question, so bear with mistakes.
I am trying to plot arrays suppose y vs x.

var x= [“1”, “1”, “2”, “3”, “3”, “4”];
var y= [“100”, “150”, “300”, “400”, "50, “120”];

The plot looks similar to this if I plot simply:
newplot

But I want boxplot for each value of repeating x i.e. 100,150 for 1 as box and so on.
It may look like this
1
The power and exponential fit (plotly can not do this but external script is needed. Is it possible in javascript itself)?
Thanks in advance.

See https://codepen.io/etpinard/pen/Mvpwxj?editors=0010

Yes. For example: https://github.com/Tom-Alexander/regression-js

1 Like

Thanks @etienne ,
The box plots when put as two traces like simple scatter gave what I wanted for two series i.e. pink and cyan.
I could not get regression-js to run, working on it.

1 Like