void plot_photon_rates_25_20_c4() { //=========Macro generated from canvas: c4/c4 Photon Rates //========= (Mon Feb 29 17:19:39 2016) by ROOT version6.05/02 TCanvas *c4 = new TCanvas("c4", "c4 Photon Rates",200,45,700,700); gStyle->SetOptFit(1); c4->Range(0,0,1,1); c4->SetFillColor(0); c4->SetBorderMode(0); c4->SetBorderSize(2); c4->SetLeftMargin(0.15); c4->SetRightMargin(0.15); c4->SetBottomMargin(0.15); c4->SetFrameBorderMode(0); Double_t Graph0_fx1001[4] = { 0, 2, 4, 6}; Double_t Graph0_fy1001[4] = { 0.2459593, 0.1908961, 0.09182515, 0.04106425}; Double_t Graph0_fex1001[4] = { 6.941928e-310, 0, 6.941926e-310, 6.941928e-310}; Double_t Graph0_fey1001[4] = { 0.0009049962, 0.0007972853, 0.0005529629, 0.0003697832}; TGraphErrors *gre = new TGraphErrors(4,Graph0_fx1001,Graph0_fy1001,Graph0_fex1001,Graph0_fey1001); gre->SetName("Graph0"); gre->SetTitle(""); gre->SetFillColor(1); gre->SetMarkerStyle(20); gre->SetMarkerSize(1.2); TH1F *Graph_Graph1001 = new TH1F("Graph_Graph1001","",100,-0.6,6.6); Graph_Graph1001->SetMinimum(0); Graph_Graph1001->SetMaximum(0.5); Graph_Graph1001->SetDirectory(0); Graph_Graph1001->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); Graph_Graph1001->SetLineColor(ci); Graph_Graph1001->GetXaxis()->SetTitle("Offset (mm)"); Graph_Graph1001->GetXaxis()->SetRange(0,101); Graph_Graph1001->GetXaxis()->SetNdivisions(505); Graph_Graph1001->GetXaxis()->SetLabelFont(42); Graph_Graph1001->GetXaxis()->SetLabelSize(0.035); Graph_Graph1001->GetXaxis()->SetTitleSize(0.035); Graph_Graph1001->GetXaxis()->SetTitleFont(42); Graph_Graph1001->GetYaxis()->SetTitle("Fraction past aperture"); Graph_Graph1001->GetYaxis()->SetLabelFont(42); Graph_Graph1001->GetYaxis()->SetLabelSize(0.05); Graph_Graph1001->GetYaxis()->SetTitleSize(0.05); Graph_Graph1001->GetYaxis()->SetTitleOffset(1.5); Graph_Graph1001->GetYaxis()->SetTitleFont(42); Graph_Graph1001->GetZaxis()->SetLabelFont(42); Graph_Graph1001->GetZaxis()->SetLabelSize(0.035); Graph_Graph1001->GetZaxis()->SetTitleSize(0.035); Graph_Graph1001->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1001); gre->Draw("ap"); Double_t Graph1_fx1002[4] = { 0, 2, 4, 6}; Double_t Graph1_fy1002[4] = { 0.2252906, 0.1783491, 0.09332027, 0.04289902}; Double_t Graph1_fex1002[4] = { 6.941928e-310, 0, 6.941926e-310, 6.941928e-310}; Double_t Graph1_fey1002[4] = { 0.0008661373, 0.0007706384, 0.0005574465, 0.0003779539}; gre = new TGraphErrors(4,Graph1_fx1002,Graph1_fy1002,Graph1_fex1002,Graph1_fey1002); gre->SetName("Graph1"); gre->SetTitle("Graph"); gre->SetFillColor(1); gre->SetMarkerColor(2); gre->SetMarkerStyle(20); gre->SetMarkerSize(1.2); gre->Draw("p"); Double_t Graph2_fx1003[4] = { 0, 2, 4, 6}; Double_t Graph2_fy1003[4] = { 0.1673138, 0.1425028, 0.09117582, 0.04765744}; Double_t Graph2_fex1003[4] = { 6.941928e-310, 0, 6.941926e-310, 6.941928e-310}; Double_t Graph2_fey1003[4] = { 0.0007464163, 0.0006888535, 0.0005510043, 0.0003983644}; gre = new TGraphErrors(4,Graph2_fx1003,Graph2_fy1003,Graph2_fex1003,Graph2_fey1003); gre->SetName("Graph2"); gre->SetTitle("Graph"); gre->SetFillColor(1); gre->SetMarkerColor(4); gre->SetMarkerStyle(20); gre->SetMarkerSize(1.2); gre->Draw("p"); TLegend *leg = new TLegend(-2.353437e-185,-2.353437e-185,-2.353437e-185,-2.353437e-185,NULL,"brNDC"); leg->SetBorderSize(1); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(0); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("Graph0","#sigma=0.5 mm","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry=leg->AddEntry("Graph1","#sigma=1.0 mm","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry=leg->AddEntry("Graph2","#sigma=2.0 mm","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); leg->Draw(); c4->Modified(); c4->cd(); c4->SetSelected(c4); }