ROOT Version: v6.18.04
Platform: Ubuntu 20.04 LTS
Compiler: C/C++
Hi, so I am new to root and I am currently using it to extract data from file and plot as well as fit them in each separate canvas, I have the fit in loop however sometimes and randomly the graph that was getting fit resizes on y-axis to x10^256. How would I be able to fix this visual issue? I tried SetNoExponent(kTRUE) but it just removed the axis. I also tried using SetLimits which helped in normal graphing but not in fitting as Y-axis still got inflated. Here is the piece of the loop
...
for(int i=0; i<n; i++){
graph[i]->GetXaxis()->SetLimits(0,3010);
graph[i]->GetYaxis()->SetLimits(-1,0.07195);
fit_fn[i]= new TF1(TString::Format("fit_fn_%d", (i+1)), "[0]*exp([1]*-x)+[2]",0,3010);
fit_fn[i]->SetParNames("stretch","decay","shift");
fit_fn[i]->SetParameters(0,0,0);
graph[i]->Fit(fit_fn[i],"B");
}
I have also attached image for reference:
Thank you all for the help in advance!