holtzy / D3-graph-gallery

A collection of simple graphics made with D3.js
https://www.d3-graph-gallery.com
MIT License
789 stars 237 forks source link

Booxplot bug #69

Open holtzy opened 2 years ago

holtzy commented 2 years ago

Hi Yan,

You don’t know me but I was just looking at this example:

https://www.d3-graph-gallery.com/graph/boxplot_basic.html

I am pretty sure that the ends of the boxplot whiskers are generally calculated differently in the statistics profession. I recall that the top whisker is at the 90th percentile and the bottom whisker represents the 10th percentile. In the D3 example these values seem a bit arbitrary and not related to the data.

So I’d recommend this code instead var min = d3.quantile(data_sorted, .1); var max = d3.quantile(data_sorted, .9);

Just some friendly feedback.

Otherwise the graphs and code examples are really helpful and a great resource.

Thanks. Ross.