Skip to content

Commit

Permalink
fix Scott’s rule (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock authored Apr 1, 2022
1 parent 2f28f41 commit f105a46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/threshold/scott.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import count from "../count.js";
import deviation from "../deviation.js";

export default function thresholdScott(values, min, max) {
return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(count(values), -1 / 3)));
return Math.ceil((max - min) / (3.49 * deviation(values) * Math.pow(count(values), -1 / 3)));
}

0 comments on commit f105a46

Please sign in to comment.