Hello, I have three data sets that I am plotting in a multigraph and I need to fit each one. When I do the fit, the fit line seems to use the entire x range of the window instead of just the range occupied by the data points. Each individual graph does not necessarily span the same x range as the others. So what I would like to do is specify in each fit, the range of the fit but when I do so, I get an error. It will not run, but here is where I am getting the error.
let array1 and array2 be the x and y value arrays, respectively. I am using pyroot by the way. Then:
gr = ROOT.TGraph(len(array1), array1, array2)
gr.Fit('pol1', 'f', xmin = min(array1), xmax = max(array1))
The resulting error is:
TypeError: none of the 2 overloaded methods succeeded. Full details:
keyword arguments are not yet supported
keyword arguments are not yet supported
I have tried putting in the exact numerical values instead of using min/max. I have also tried ordering each option perfectly but nothing seems to work. When I run it just as
gr.Fit('pol1', 'f')
it works fine but with the extended fit range.
Any help is appreciated! I guess another question is, is the fit function only using the range of data available, then just drawing across the whole page? Thanks!
ROOT Version: 6.12/06
Platform: Ubuntu 18.04
Compiler: Not sure