TF2 on a TH3 with SURF option

From: Chris Roat <chris.roat_at_gmail.com>
Date: Tue, 25 Jan 2005 10:05:30 -0800


Hi,

While it is possible to draw a TF2 on a TH2 as a contour plot, it seems it is not possible to draw a TF2 on a TH3 with the SURF option.

  c1= new TCanvas("c1");
  c1->Divide(2,1);

  c1->cd(1);
  TH2* h1= new TH2F("h1","h1",1,0,20,1,0,20);   h1->Draw();
  TF2* f1= new TF2("f1","2*x",0,10,0,10);   f1->Draw("SAME");

  c1->cd(2);
  TH3* h2= new TH3F("h2","h2",1,0,20,1,0,20,1,0,20);   h2->Draw();
  TF2* f2= new TF2("f2","2*x",0,10,0,10);   f2->Draw("SURF2 SAME");

My goal is to be able to draw several TF2's on the same plot, each with slightly different, but possible overlapping, ranges. In fact, I see now that plotting with SURF SAME does not seem to work:

  TF2* f2= new TF2("f2","3*x",0,20,0,20);   f2->Draw("SURF");
  TF2* f= new TF2("f","2*x",0,20,0,20);
  f->Draw("SAME SURF");

I'm using ROOT 4.02/00 on Debian.

Cheers,
Chris Received on Tue Jan 25 2005 - 19:05:36 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET