{ TCanvas *c1 = new TCanvas("c1","",900,500); gStyle->SetCanvasColor(0); gStyle->SetTitleFillColor(0); gStyle->SetTitleBorderSize(0); gStyle->SetStatColor(0); c1->SetBorderMode(0); c1->SetFillColor(0); c1->GetFrame()->SetFillColor(0); c1->GetFrame()->SetBorderMode(0); c1->Modified(); c1->Update(); c1->SetGridy(); const double CMS_tot = 21; const double Err_tot = 4; const double CMS_cut = 23; const double Err_cut = 3; const double FWD_tot = 22.4; const double ErrFwd_tot = 2.3; const double ATLAS_tot = 25.1; const double ErrA_tot = 3.2; const double ATLAS_cut = 25.6; const double ErrA_cut = 2.3; const double ALICE_tot = 20.1; const double ALICE_cut = 22.2; const double ALICEErr_tot = 2.3; const double ALICEErr_cut = 2.3; double xT[4]={1, 2, 3, 4}; double exT[4] = {0}; double xC[3] = {1.1, 2.1, 4.1}; double exC[3] = {0}; double yT[4] = {CMS_tot, ATLAS_tot, FWD_tot, ALICE_tot}; double eyT[4] = {Err_tot, ErrA_tot, ErrFwd_tot, ALICEErr_tot}; double yC[3] = {CMS_cut, ATLAS_cut, ALICE_cut}; double eyC[3] = {Err_cut, ErrA_cut, ALICEErr_cut}; TGraphErrors *grT = new TGraphErrors(4, xT, yT, exT, eyT); TGraphErrors *grC = new TGraphErrors(3, xC, yC, exC, eyC); // TGraphErrors *gr2 = new TGraphErrors(2,x2,y2,ex2,ey2); grT->SetTitle(""); grT->GetXaxis()->SetRangeUser(0,6); grT->GetYaxis()->SetTitle("No. of Squirrels in Azerbaijan."); grT->SetMarkerColor(2); grC->SetMarkerColor(9); grT->SetMarkerStyle(20); grC->SetMarkerStyle(24); grT->SetMarkerSize(1.2); grC->SetMarkerSize(1.2); grT->SetLineColor(2); grC->SetLineColor(9); grT->SetLineWidth(2); grC->SetLineWidth(2); grT->GetXaxis()->SetBinLabel(grT->GetXaxis()->FindBin(1), "Exp1 All"); grC->GetXaxis()->SetBinLabel(grC->GetXaxis()->FindBin(1.1), "Exp1 cut"); grT->GetXaxis()->SetBinLabel(grT->GetXaxis()->FindBin(2), "Exp2 All"); grC->GetXaxis()->SetBinLabel(grC->GetXaxis()->FindBin(2.1) ,"Exp2 Cut"); grT->GetXaxis()->SetBinLabel(grT->GetXaxis()->FindBin(3), "Exp3 All"); grT->GetXaxis()->SetBinLabel(grT->GetXaxis()->FindBin(4), "Exp4 Full"); grC->GetXaxis()->SetBinLabel(grC->GetXaxis()->FindBin(4.1) ,"Exp4 Cut"); grT->GetXaxis()->LabelsOption("h"); grC->GetXaxis()->LabelsOption("h"); grT->GetXaxis()->SetLabelColor(2); grC->GetXaxis()->SetLabelColor(9); grT->Draw("AP"); grC->Draw("PSame"); axis->Draw(); }