Draw the parameters of a TF1 (w/ out histogram)

Suppose I just create a TF1 and set its parameters like so:

root [7] TF1* f = new TF1("fff", "[0] + [1]*x", -5, 5);   
root [8] f->SetParameter(0, 2)
root [9] f->SetParameter(1, 0.5)

Is there a TStyle attribute or something I can set to make it draw with the parameters printed in a TPaveText, similar to what you can do when you fit a histogram?


You can use the following trick


{ gStyle->SetOptStat(0); gStyle->SetOptFit(); TF1* f = new TF1("fff", "[0] + [1]*x", -5, 5); f->SetParameter(0, 2); f->SetParameter(1, 0.5); f->Draw(); TH1F *h = new TH1F("fff","",2,-5,5); h->GetListOfFunctions()->Add(f); h->Draw("sames"); }