Bumping TRatioPlot TH1/THStack instead of THStack/TH1 in ratio plot

Continuing the discussion from TRatioPlot TH1/THStack instead of THStack/TH1 in ratio plot:

I found this thread from 2018 and as far as I can see there’s still no option in the constructor to do TH1/THStack - which I imagine would be a more popular use case (although I may be wrong) than the opposite.

It would be super useful if this constructor could be introduced into the class.

As said in the discussion you refer to, there is a TRatioPlot constructor using THStack: ROOT: TRatioPlot Class Reference
Is that what you are looking for ?

I’m looking for the opposite, instead of doing the ratio between the THStack and the TH1 I want to do the ratio between the TH1 and the THStack

something like that ?

TRatioPlot	(TH1 *h1, THStack *st,cOption_t * 	option = "pois" )		

Yes exactly, as far as I’m aware this isn’t possible currently

I think the workaround is to make the sum of all histogram in the stack (that’s what the existing constructor does anyway I think).

Right but that’s more lines of code, it would be really helpful if there was a method which already did that for you; it would be more elegant and reduce the risk of typos etc.

1 Like

May be post a request as a github issue so we do not forget about it.

1 Like

PR here: New ctor using THStack by couet · Pull Request #16485 · root-project/root · GitHub

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