Histogram in 2D density plot doesn't plot if the size of bin is exceed the end of maximun end bin



I’m trying to plot 2D density plot. I noticed that the bar in histogram will not be plot if the bin size is more that the start/end value of x/ybins. Attached is the sample picture and also the jsfiddle to play around with. Is is possible to plot it to the start/end value of the bin.

The slider ia no. of bin. The min is 1 and the maximum is 11.

JSfiddle: https://jsfiddle.net/amalinafz/mtc86p5b/


Let me add my explanation.
Now the no. of bin=10
The 9th end bin value= 2.0016
If I add with the binsize 2.0016 + 0.37851939913868266 = 2.3801193991

Hence, I’m wondering why the 10th bin is not there. Or let say if the previous bin + the binsize exceed the maximum value, can it still be drawn till the maximum? Last time I check, it will ignore the last bin that why it become like the picture attached.