Hi!
I have two 2D histograms which I’ve already projected to 1D. I want to subtract the histogram from each other and plot it as one.
Here is the code:
If you want to project a 2D histogram to a 1D histogram, you should use the Projection function rather than the Profile function (Look at the return values here: https://root.cern.ch/doc/master/classTH2.html)
The substraction of two histgrams can be understand as an addition with factor -1 and this is exactly the way it is implemented in root. If you want to keep the original histograms you need to clone the first one first: