Dear corooters, I want to plot on different pads but in the same canvas and get the results. This is my code that does’t work. Hope it’s not a problem for you!
auto c1 = new TCanvas("c1", "Canvas", 200, 10, 1000, 600);
c1->Divide(3, 1, 0.0002, 0.0002);
//1 op
c1->cd(1);
TGraphErrors *fileInput = new TGraphErrors("../File/coniugati_fabio.txt", "%lg %lg %lg %lg");
fileInput->Draw("AP");
TF1 *line = new TF1("f1", func, 0.006, 0.0096, 2);
line->SetParNames("b", "a");
fileInput->Fit(line, "S");
//2 op
c1->cd(2);
TGraphErrors *fileInput1 = new TGraphErrors("../File/coniugati_marco.txt", "%lg %lg %lg %lg");
fileInput1->Draw("AP");
TF1 *line = new TF1("f2", func, 0.006, 0.0096, 2);
line->SetParNames("b", "a");
fileInput1->Fit(line, "S");
//3 op
c1->cd(3);
TGraphErrors *fileInput2 = new TGraphErrors("../File/coniugati_tommaso.txt", "%lg %lg %lg %lg");
fileInput2->Draw("AP");
TF1 *line = new TF1("f3", func, 0.006, 0.0096, 2);
line->SetParNames("b", "a");
fileInput2->Fit(line, "S");
}```