{ gROOT->SetStyle("Plain"); c1 = new TCanvas("c1","Dynamic Filling Example",200,10,400,400); // c1->SetOptStat("0000000"); not property of c1 Float_t x_50[8] = {0, 34, 50, 75, 125, 0, 10, 22}; Float_t res_50[8] = {221, 224, 221, 218, 204, 0, 50, 50}; Float_t x_80[9] = {0, 25, 34, 50, 75, 125, 0, 10, 22}; Float_t res_80[9] = {240, 249, 244, 242, 225, 241, 0, 75, 75}; Float_t x_120[8] = {0, 25, 50, 75, 125, 0, 10, 22}; Float_t res_120[8] = {272, 261, 241, 244, 291, 0, 100,100}; frame = new TH2F("frame","resolution vs threshold cut",10,0.,130.,10,0.,400.); //frame->SetOptStat("0000000"); frame->Draw(); for (int i=0;i<4;i++) { TLine *line1 = new TLine(x_50[i], res_50[i], x_50[i+1], res_50[i+1]); line1->SetLineWidth(3); line1->SetLineColor(2); line1->Draw(); } TLine *line1a = new TLine(x_50[6], res_50[6], x_50[6+1], res_50[6+1]); line1a->SetLineWidth(3); line1a->SetLineColor(2); line1a->Draw(); for (int i=0;i<5;i++) { TLine *line2 = new TLine(x_80[i], res_80[i], x_80[i+1], res_80[i+1]); line2->SetLineWidth(3); line2->SetLineColor(3); line2->Draw(); } TLine *line2a = new TLine(x_80[7], res_80[7], x_80[7+1], res_80[7+1]); line2a->SetLineWidth(3); line2a->SetLineColor(3); line2a->Draw(); for (int i=0;i<4;i++) { TLine *line3 = new TLine(x_120[i], res_120[i], x_120[i+1], res_120[i+1]); line3->SetLineWidth(3); line3->SetLineColor(4); line3->Draw(); } TLine *line3a = new TLine(x_120[6], res_120[6], x_120[6+1], res_120[6+1]); line3a->SetLineWidth(3); line3a->SetLineColor(4); line3a->Draw(); }