Odd behavior with THSTACK

Dear Experts,

I am seeing a weird behavior while trying to overlay histograms using TStack()
somehow the 2nd histogram gets added to 1st one when I use THStack. I attached a picture showing the 2 histogram before overlaying them and after overlaying using THStack by using

stack = ROOT.THStack()
stack.Add(hist_OLD)
stack.Add(hist_NEW)

and also after doing a normal overlay by using

hist_OLD.Draw()
hist_NEW.Draw("same")

I would expect the 2 methods give the same result, but apparently something wrong going on here with THStack.

Is there any reason behind this ?

Thanks
Yassine

stack.Draw("NOSTACK")

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.