Re: [ROOT] Plotting error on data point

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Apr 06 2001 - 09:19:36 MEST


Hi Tarun,

I have implemented options to draw arrows at the end of the error bars
in TGraphErrors and TGraphAsymmErrors. In addition to the TGraph paint options,
the two Errors classes have now the following options:
// by default horizonthal and vertical small lines are drawn at
// the end of the error bars. if option "z" or "Z" is specified,
// these lines are not drawn.
//
// if option contains ">" an arrow is drawn at the end of the error bars
// if option contains "|>" a full arrow is drawn at the end of the error bars
// the size of the arrow is set to 2/3 of the marker size.
//
// By default, error bars are drawn. If option "X" is specified,
// the errors are not drawn (TGraph::Paint equivalent).

The new version is available from CVS.

Rene Brun

Tarun Kanti Ghosh wrote:
> 
> Hello,
> 
> I am trying to plot error bars on the data points using object TGraphErrors.
> 
>    Float_t x3[]  = {};
>    Float_t y3[]  = {};
>    Float_t ex3[] = {};
>    Float_t ey3[] = {};
>    gr3 = new TGraphErrors(n3,x3,y3,ex3,ey3);
>    gr3->SetMarkerColor(kBlack);
>    gr3->SetLineWidth(3);
>    gr3->SetMarkerStyle(21);
>    gr3->Draw("LP");
> 
> How do I get the error bars with an upper end  and descending arrow
> at the lower head.
> Any help will be appreciated.
> 
> Best regards,
> Tarun
> 
> ----------------------------------------------------------
> Tarun Kanti Ghosh    Vanderbilt University
> Tel: (615) 343 1709     Fax: (615) 343 7263
> URL: http://www.phenix.bnl.gov/~tghosh/tarun.html



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:41 MET