Re: [ROOT] How to draw TF2 on top of TH2?

From: Olivier Couet (couet@mail.cern.ch)
Date: Thu Sep 16 2004 - 17:59:20 MEST


Hi Thomas,

 For some reason I do not understand yet, the fact your function name is 
empty produces that strange behaviour.

 Just do:

TF2 f("a", "x*x+sqrt(y)");

 Olivier

On Thu, 16 Sep 2004, Thomas Bretz wrote:

> Hi,
> 
> I'm doing:
> TH2F h("", "", 10, 0, 1, 10, 0, 1);
> int i;
> for(i=0;i<100;i++)h.Fill(gRandom->Uniform(),sqrt(gRandom->Uniform()));
> h.Draw("colz");
> TF2 f("", "x*x+sqrt(y)");
> f.Draw("cont2same");
> 
> And get the attached (strange) output (Axis!) Why does plotting the TF2 
> always change the axis scaling (and non-linear)?
> 
> What am I doing wrong?
> 
> Thomas.
> 

-- 
Org:    CERN - European Laboratory for Particle Physics.
Mail:   1211 Geneve 23 - Switzerland                     Mailbox: J25910      
E-Mail: Olivier.Couet@cern.ch                            Phone:   +41 22 7676522
WWW:    http://cern.ch/Olivier.Couet/                    Fax:     +41 22 7677155



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET