Hi all,
I have a function to fit multiGraph and I would like to show the uncertainties of the fit. I have tried to follow the example of ConfidenceIntervals.C but the band of the uncertainties is not shown (see attached plot). Any help or tips of how I can show the band of the uncertainties from fitting. Also, is there away to show the band within 1 or 2 sigma?
Thanks in advance,
below is a part of my code
Hi couet,
Thanks for the quick replay. still, the band error is not shown. Attached below is a complete code with text files that are needed to run my code.
Thanks @couet , I wondering if there is a way to show the band error within only the range of fitting. because one I changed the xvalue to create the band as:
I do not understand how you get this. When I zoom a graph-errors drawn with option 3 the clipping is correct. Can you provide a small reproducer showing this effect? or save the graph in a root file.
Thank you so much @couet but now I getting the error band below 1.5, how I can remove it? I do not quite understand why if I fit a certain range =[1.5-8], I see the error for fitting in the whole range.
Thank you so much @couet . Now it works. I have just one more question. How I can print the value of the uncertainty from fitting? I would like to show the band as I have drawn it by hand (black) instead of showing it in the curve.
Hi @moneta ,
yes I followed the example and I already got the band. My question is how I can print the output of the band. I would like to show the band of uncertainty as a black band in the figure (I just drew it by my hand) instead of showing it in the data points (as you see it with kMagenta color)
You can get the band values either as the error of the TGraphErrors grint in the given example, or you can also use directly the function FitResult::GetConfidenceIntervals.