void script_2(TString filename="istog.root"){ TFile *file = new TFile(filename); h->Draw(); TF1* fit1 = new TF1("lin_fit1","pol1"); h->Fit("lin_fit1","N","",-1,1); fit1->Draw("same"); }