Hi, I need to plot three sets of data each with its own pol1 fit on the same TGraph. I am not sure how to do that. I have the code written for one set of data with a pol1 fit but I don’t know how to combine it. Here is my current code:
{
g = new TGraph("SST.txt");
g->SetMarkerStyle(21);
g->SetLineColor(kRed);
g->SetTitle("Small Surface Thickness");
gStyle->SetOptFit(1);
g->Draw("AP");
f = new TF1("f","pol1");
g->Fit(f);
}