Re: [ROOT] questions on histogram errors

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Sep 18 2003 - 15:24:40 MEST


Stephane,

Stephane Plaszczynski wrote:
> 
> OK both work well (even if I don't understnd why the Update() should be
> moved...)
> 

see the description of the Canvas Draw/Paint/Update in the Users Guide
at pages 106,107 and 111

Rene Brun

> thanks for your patience,
> 
> Stephane
> 
> --On Thursday, September 18, 2003 03:07:11 PM +0200 Rene Brun
> <Rene.Brun@cern.ch> wrote:
> 
> >
> >> --On Thursday, September 18, 2003 12:02:44 PM +0200 Rene Brun
> >> <Rene.Brun@cern.ch> wrote:
> >>
> >> > I don't know what you mean by sigma_y?
> >> > If you just want to draw a set of points with eerrors, use TGraphErrors
> >> > TGraphErrors(n,x,y,ex,ey)
> >>
> >> OK. So I guess my question is whether there is an "automated" way of
> >> creating this Graph directly from the ntuple entries (I am used to a tool
> >> that can do it): something like Draw("y:x") but where each point
> >> displayed would have an error bar given by two other ntuple entries
> >> "sigmax,sigmay"?
> >>
> >
> > You can do the following
> >  nt->Draw("x:y:sigmax","sigmay","goff");
> >  TGraphErrors g(nt->GetSelectedRows(),nt->GetV1(),nt->GetV2(),nt->V3(),
> >                 nt->GetW());
> >  g.Draw("ap");
> >
> > see TTree::Draw doc section "How to obtain more info from TTree::Draw"
> >
> >> >
> >> II tried the following unamed script (following your suggestion). It is
> >> in "myscript.C"
> >> I log in interactively to root and type
> >> .x myscript.C
> >> but the ntuple points do not appear....
> >>
> >
> > You should move the c1->Update() statement immediatly after having drawn
> > the histogram. See change below



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