Setting errors in a THStack


Assuming to TH1 with the same bins, I use TGraphAsymmErrors to set the errors of a TH1 from another TH1


Now, the “hn” is actually the “last” histo from a THStack ie

TH1 *hn = ((TH1 *)(hstack->GetStack()->Last()));

But my problem is that I want to plot the error band on top of a THStack ie setting the “gr” as an error band to be draw on top the THStack (ie without having to do “Add”)…Is there a way ?



simply draw the graph without option A

Yes, but I want to draw the error band “after” the THStack ie on top of it - If I simply draw it, then it wont be at the same “level” like the THStack plot

I am not sure I completely understand your point.
Can you produce a small macro showing what you mean ?