could you please provide a small reproducer?
Also, I would recommend to upgrade your ROOT version, e.g. to Root 6.32, as we are constantly fixing bugs and implementing new features.
{
gStyle->SetOptFit(1111);
auto h1 = new TH1I("h1", "h1", 100, -5, 5);
h1->FillRandom("gaus", 1000);
h1->Fit("gaus");
// without this line saved canvas will not have desired settings
gPad->Update();
gPad->SaveAs("optfit.root");
}
You need to be sure that histogram painted before it saved into the file.
In such case TPaveStats object will be created - with correct settings.