Dear rooters
I want to draw a 2D histogram, in which the bins to be filled are the ones crossed by the line y=mx+b. These bins should have the value 1, while the rest remain at 0.
Lets suppose that I have a 3x3 histogram. If my slope is y=x, only the bins (1,1), (2,2) and (3,3) must be filled.
The thing gets complicated when y and x are not integers, and I’m not sure which bins should I fill.
Do you know if there is any way to fill lines of bins directly in Root, or I will need to compute a function that calculates which bins should be filled?
Thank you all
Pedro