1 dim function plot using TF1

Jayoung Wu (jayoung@glue.umd.edu)
Mon, 9 Mar 1998 17:18:43 -0500 (EST)


I tried 1 dim function plot using TF1 in two ways:
1.
...

TF1 *gline = new TF1("gline","-3*x+5",-25.,25.);
gline->SetLineWidth(2.0);
gline->Draw("SAME");

...

---> It works fine.

2.
...

Float_t b0=5,b1=-3;
TF1 *gline = new TF1("gline","pol1",-25.,25.);
Float_t par[2];
par[0] = -b0/b1;
par[1] = 1/b1;
gline->SetParameters(par);
gline->GetParameters(par);
gline->SetLineWidth(2.0);
gline->Draw("SAME");

---> Error???
Error: Can't call TF1::SetParameters() in current scope FILE:ytrack.C
Error: No symbol gline->SetParameters(par) in current scope FILE:ytrack.C

Error: Can't call TF1::GetParameters() in current scope FILE:ytrack.C
Error: No symbol gline->GetParameters(par) in current scope FILE:ytrack.C

========================================
Do you have any idea how I can plot 1dim function such as "a*x +b" (a and
b are variable)?

---
Thanks a lot!
Jayoung