How can I change the colour in the x direction only?

Dear All,
I want to change the colour in the x direction(error bars in x direction). Could you please suggest me what should I add to my following code ?
I want to put two different colours for two different error bars.

Thanks in Advance.
eff_gr_pi.C (659 Bytes)

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

   double x[]  = {0.085, 0.145, 0.195, 0.27};
   double y[]  = {1.11,1.21,1.08,1.00};
   double ex[] = {0.035, 0.025, 0.025, 0.05};
   double ey[] = {0.08,0.06,0.05,0.06};
   auto ge1    = new TGraphErrors(4, x, y, ex, 0);
   auto ge2    = new TGraphErrors(4, x, y, 0, ey);



   ge1->GetXaxis()->SetTitle("#pi_{slow} in momentum GeV/c");

Thanks. It did help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.