Re: TGraph

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Dec 13 1999 - 15:59:09 MET


Aihong,
No way for TGraph to distinguish between a point not initialized and
(0,0).
If you have this kind of problem, create your arrays x and y yourself,
then
call the standard TGraph constructor with (n,x,y).

Rene Brun


Aihong Tang wrote:
> 
> Hi:
> 
> I'd like to make a comment on TGraph.
> 
> Suppose I declare a graph "gr" by:
> TGraph gr(10)
> This means allocate room for 10 points.
> 
> Later on I do not fill points up to 10, say I
> just put 7 points into "gr".(this does happen
> in code because sometime the # of points inputed
> depends on sth else.)
> 
> Then when I call gr.Fit(...), I think it will fit
> based on my 7 points and another 3 points at (0,0).
> 
> Ofcourse we do not want to include those Zeros in
> the fitting.
> 
> This is not critical, but not convenient for
> the user.
> 
> Correct me if I am wrong? Thanks.
> 
> Aihong



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