I try to use THStack class to deal with several TH1F but I don’t understand some points…
when I first draw a TH1F and then want to plot the THStack in the same pad, THStack isn’t drawn (whereas single TH1F is). I do :
hd->Draw(“e1p”); //TH1F* hd
hstack->Draw(“samenostack”); // THStack* hstack
when I modify the range of all the TH1F composing the THStack, modification isn’t taken into account when drawing THStack. I do :
hd->SetAxisRange(4, 30); (for all TH1F composing THStack)
hstack->Draw(“nostack”)
If I plot a single TH1F, modification is taken into account.
So I’d appreciate if anyone could help me understanding what I do wrong.
thanks for your reply but my problem was to draw first a reference histogram and then the THStack and it seems I can’t use “same” option to draw THStack.
Nevertheless, I managed to do what I needed using THStack::GetXaxis()::SetLimits(xmin, xmax)