{ // // To see the output of this macro, click begin_html here. end_html // gROOT->Reset(); c1 = new TCanvas("c1","Difference of backgrounds",200,10,700,500); c1->SetFillColor(0); c1->SetGrid(); c1->SetBorderMode(0); // draw the legend TLegend *legend=new TLegend(0.5,0.65,0.88,0.85); ntuple_meas = new TNtuple("measured","Meas data","E:Y:T:S:P:TP"); int NData = ntuple_meas->ReadFile("LossBG1.csv"); ntuple_meas->SetLineColor(2); ntuple_meas->SetLineStyle(0); ntuple_meas->SetLineWidth(3); ntuple_meas->SetMarkerSize(0); ntuple_meas->Draw("T:E","Y"); ntuple_meas->SetLineColor(1); ntuple_meas->SetLineStyle(0); ntuple_meas->SetLineWidth(3); ntuple_meas->Draw("S:E","Y","Csame"); /* ntuple_meas->SetLineColor(2); ntuple_meas->SetLineStyle(1); ntuple_meas->SetLineWidth(3); ntuple_meas->Draw("P:E","P","Csame"); ntuple_meas->SetLineColor(3); ntuple_meas->SetLineStyle(1); ntuple_meas->SetLineWidth(3); ntuple_meas->Draw("TP:E","TP","Csame"); legend->Draw(); */ ntuple_meas->SetMarkerStyle(6); ntuple_meas->SetMarkerSize(3); ntuple_meas->Draw("Y:E","Y","Csame"); // TCanvas::Update() draws the frame, after which one can change it c1->Update(); c1->GetFrame()->SetFillColor(0); c1->Modified(); }