1 dim function plot using TF1

From: Jayoung Wu (jayoung@glue.umd.edu)
Date: Mon Mar 09 1998 - 23:18:43 MET


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



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:30 MET