Variable bin size "histogram" is not a histogram

By definition of a histogram, I expect the area of a bin to be proportional to the number of entries in that bin:
Usually, when bin sizes are equal, the distinction is not important, but for variable bin sizes that is crucial. The histogram should be an estimate of the PDF of the filled variable.

Now, I’ve made a histogram with two bins: (0.0,0.9) and (0.9,1.0) and I’m filling it with the uniform distribution:

root [0] float bins[]={0,0.9,1.0};
root [1] h = new TH1F("h","h", 2, bins)
root [2] h->FillRandom("pol0",1000)
root [3] h->Draw()

I expect the first bin to be filled with roughly 900 entries and have an area of 900 => height of 1000.
I expect the second bin to be filled with roughly 100 entries and have an area of 100 => height of 1000.
As I result I expect to see the histogram, showing my uniform PDF.

Instead, I’m getting a “histogram” having first bin height=900 and second bin height=100.
This behavior is utterly unexpected and should (at very least) be documented.

I have no idea what you’re complaining about, but you can try: Different ways of normalizing histograms