Reusing histograms

Hello, I am making a code that should plot the same variables under different circumstances (criteria to select collision events), and produce images of all the different plots.

I was thinking that I could use just one histogram per variable and reuse with every different set of circumstances, I tried something like:


And then I fill the histogram with the new data, but the next plot comes out empty, it’s just a white canvas (I am using different canvases).

Maybe I should use another method, or I am using Clear() wrong

Thanks a lot for your help


[quote=“Pepe Le Pew”]Try:

Thanks Pepe!