Initially, before minbins: 10 above, I had tried maxbins: 30, and it rendered following:
This confused me a lot, especially because two bars in the range 90-100. Also, nowhere in cdf_data, it says 0-5 range has 35% of students and 5-10 range has 0% of students. I felt that, being "max" limit, it will end up showing just 10 bins as in case of first figure. Instead, it created 20 bins. Am I missing some understanding here or its a bug?
Here is the observablehq notebook rendering both plots.
I think this is as expected. If you have prebinned data, use the binned property. The last in is inclusive the upper bound and not exclusive. The actual number of bins depends only on the range and not the data.
I have a following data:
I created following visualization:
This outputs:
Initially, before
minbins: 10
above, I had triedmaxbins: 30
, and it rendered following:This confused me a lot, especially because two bars in the range
90-100
. Also, nowhere incdf_data
, it says0-5
range has 35% of students and5-10
range has 0% of students. I felt that, being "max" limit, it will end up showing just 10 bins as in case of first figure. Instead, it created 20 bins. Am I missing some understanding here or its a bug?Here is the observablehq notebook rendering both plots.