souvik
February 17, 2021, 12:29pm
1
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
couet
February 17, 2021, 1:05pm
2
{
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->SetMarkerStyle(20);
ge1->SetLineColor(kRed);
ge1->Draw("ap");
ge2->SetLineColor(kBlue);
ge2->Draw("p");
ge1->GetXaxis()->SetTitle("#pi_{slow} in momentum GeV/c");
ge1->GetYaxis()->SetTitle("#epsilon(Data)/#epsilon(MC)");
}
system
Closed
March 3, 2021, 7:17pm
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.