The fit parameters were painted too early. With the following macro the error bars overlapped the stat box:
The fit parameters were painted too early. With the following macro the error bars overlapped the stat box:

{
   vector < float > X, Xerr;
   vector < float > Y, Yerr;
   for(int i=0 ; i<10 ; ++i) {
      X.push_back(i*0.1); Xerr.push_back(1.);
      Y.push_back(i*2.2); Yerr.push_back(1.);
   }
   auto g = new TGraphErrors(X.size(), &(X[0]), &(Y[0]), &(Xerr[0]), &(Yerr[0]));

   auto f = new TF1("f","pol1",0.,1.); g->Fit("f","QR");
   gStyle->SetOptFit(true);

   g->Draw();
}

root-mirror/root,root-mirror/root,root-mirror/root,root-mirror/root,karies/root,karies/root,olifre/root,olifre/root,olifre/root,karies/root,karies/root,olifre/root,root-mirror/root,olifre/root,karies/root,root-mirror/root,karies/root,root-mirror/root,olifre/root,root-mirror/root,root-mirror/root,root-mirror/root,olifre/root,olifre/root,root-mirror/root,olifre/root,karies/root,karies/root,karies/root,karies/root,olifre/root,karies/root,olifre/root