I want to fit 2 gaussian into this plot. I tried fit function. It looked like this.
Then I decreased the limit of fit made it from 0 to 0.5 and it looked like this
I want 2 humps like this in my plot. But I can only get one even if I tried using 2 gaussian fit. Here’s my code
void c1()
{
TCanvas *c1 = new TCanvas("c1", "Canvas", 2000, 1000);
TGraph *gr = new TGraph("36S_10.dat");
TF1 *f1 = new TF1("f1", "gaus", 0, 0.5);
gr->Fit("f1", "R");
TF1 *f2 = new TF1("f2", "gaus", 0.5, 1);
gr->Fit("f2", "R");
gr->Draw();
}
Can anybody help me to add 2 gaussians to same plot. Huge thanks in advance