I have a TProfile, and I fit it with two different functions (using the “+” and “same” options). When I draw the TProfile, both fitting funcitons are shown, but the stats box only shows the first fit result.
gStyle->SetOptFit(kTRUE) is at the begginging of the script.
this is not really the most elegant solution, but you could just clone the histo before fitting it, fit the function to the two – identical – histograms and then draw the second one with the “sames” option and move the stat box. The piece of code below illustrates on how you could do this. Note that you need the c1->Update(), or alternatively, if you don’t explicitly create a canvas, a gPad->Update() to make sure you can access the stats boxes.