{ gStyle->SetOptStat(111111); gStyle->SetOptFit(1); TH1F *h1 = new TH1F("h1","histo from gaussian",100,-3,3); h1->FillRandom("gaus",10000); TH1F *h2 = new TH1F("h2","histo from gaussian",100,-3,3); h2->FillRandom("gaus",10000); h1->SetLineColor(2); h2->SetLineColor(4); h1->Draw(); h1->Fit("gaus"); h2->Draw(); h2->Fit("gaus"); h1->Draw(); h2->Draw("sames"); TPaveStats *stats = (TPaveStats*)(h1->GetListOfFunctions()->FindObject("stats")); stats->SetX1NDC(0.2); stats->SetX2NDC(0.7;) c1->Update(); }