Resize legend got from fitting

Dear all,

I have one question related to legend size.
I make a fitting with user-defined function.
before I fit, I set gStyle->SetOptFit(1111).
So after fitting, a legend is printed with fit parameters.
I want to resize the legend. (since it is too small)
Do you know any way for this purpose?
An alternative way is also very helpful.

Thank you

{
   gStyle->SetOptFit(1111);
   auto h = new TH1F("h","h",100,-5,5);
   h->FillRandom("gaus",10000);
   h->Fit("gaus");

   // Make the fit box very large
   gPad->Update();
   TPaveStats *box = (TPaveStats *)h->FindObject("stats");
   box->SetX1NDC(0.01);
   box->SetY1NDC(0.01);
   box->SetX2NDC(0.99);
   box->SetY2NDC(0.99);
   gPad->Modified();
   gPad->Update();
}

Note also: Tips for Efficient and Successful Posting

1 Like

Thank you very much !

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.