[ROOT] 2D Fit autoscaling problem

From: steven staelens (steven.staelens@rug.ac.be)
Date: Mon Mar 17 2003 - 19:55:02 MET


root Version 3.05/01 on Intel Linux RH 7.1



        Hi ,


In addition to a former mail I narrowed my problem down to the
following:

I have fitted a twodimensional function to a twodimensional histogram as
it should following ROOT user guide lines.  The fit seems to be OK, but
to be really sure I have to plot it on top of the lego plot of the
histogram.  When I do so, the maximum value of my histogram is set equal
to the maximum of my 2D fit.  In my case, this is absolutely not
wanted.  I've read on the ROOT digest that this is normal and that it
can be solved by using a MultiGraph.

Being a ROOT newbie however I don't know how to switch the drawings of
my TF2 and of my TH2F into a TGraph.  I've tried in the following
pathetic way:

TGraph *f2D = new TGraph()
h2D->Draw(">>t1")

but I realize this is not the way it should be.

Can somebody perhaps help me out by giving an example on how to change a
2D histogram drawing into a TGraph object and the same question for a
twodimensional function.  When this is solved I can then easily do:

TMultigraph *mg = new TMultiGraph()
mg->Add(gr1)
mg->Add(gr2)
mg->Draw()

and my problem will be solved.


Thanks in advance,

best regards,

Steven

S. Staelens
Ghent University
ELIS / Medisip
Proeftuinstraat 86
B-9000 Gent
tel. 0032 9 264 66 28
fax. 0032 9 264 66 18
email: Steven.Staelens@rug.ac.be



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET