Color of the confidence Interval in TRatioPlot

Dear ROOT experts,
I am using the TRatioPlot to see the fit residual of a fitted histogram. I was checking the code of the color and I found in line 622 and 623 of TRatioPlot.cxx the color of the intervals are swapped.
Namely,
fConfidenceInterval2->SetFillColor(fCi1Color);
fConfidenceInterval1->SetFillColor(fCi2Color);
Why is it so?

Line 622 of TRatioPlot.cxx is not what you say. May be you are looking at an old version ?

@couet How about the line 601? :wink:

Yes, I am looking to ROOT 6.08/07, the version I was using. But, the link you sent has the same issue in line 601 and 602 as mentioned by @Wile_E_Coyote.

On this plot are the colours inverted compare to the documentation description ?

I went back in the code history. Initially the colours were not settable and the code was:

     fConfidenceInterval2->SetFillColor(kGreen);
     fConfidenceInterval1->SetFillColor(kYellow);

The colours were hardcoded. The outside was green and the inside yellow. With the new code the outside is also green and the inside yellow. So the default are correct. Therefore it is not enough to change the two colours indices. The default values should also be changed.

This is my impression. If you look the two parameters ci1 and ci2 are respectively, they are respectively the color of confidence level of 1 sigma and 2sigma respectively. I intuitively guess that 1 sigma C.L. is narrower than 2 sigma C.L. (I am not 100% sure). The default color scheme in my understanding is kGreen for 1 sigma CL and kYellow for 2 Sigma CL. Which is the parameter in your attached example.

I was therefore looking into the color scheme in the .cxx file. There I found in the part where the code is filling colors of the confidence intervals it is filling the color assigned to the 1 sigma one into CL2 and 2 sigma one into CL1. This is what made me puzzled.

I think you are right. I will make a PR. Thanks to have seen it.

PR: Fix colour issue for TRatioPlot by couet · Pull Request #8872 · root-project/root · GitHub