{ #include #include c1 = new TCanvas("c1","A Simple Graph",0,0,700,500); c1->SetFillStyle(4100); //c1->SetGrid(); c1->GetFrame()->SetBorderSize(12); TStyle *default = new TStyle("Default","Default Style"); //default->SetPadBorderMode(0); default->SetCanvasColor(0); default->cd(); // this becomes now the current style gStyle // create the arrays for the points Int_t n = 231; Double_t x[n], y1[n], y2[n], y3[n], y4[n], y5[n]; ifstream fin("TDR_reprod.txt"); for (int i=0; i<231; i++)fin >> x[i] >> y1[i] >> y2[i] >> y3[i] >>y4[i] >>y5[i]; fin.close(); g1 = new TGraph(n,x,y1); g2 = new TGraph(n,x,y2); g3 = new TGraph(n,x,y3); g4 = new TGraph(n,x,y4); g5 = new TGraph(n,x,y5); g1->SetTitle(); g1->SetMarkerColor(6); g1->SetMarkerStyle(1); g1->SetLineColor(6); g2->SetMarkerColor(7); g2->SetMarkerStyle(1); g2->SetLineColor(7); g3->SetMarkerColor(5); g3->SetMarkerStyle(1); g3->SetLineColor(5); g4->SetMarkerColor(2); g4->SetMarkerStyle(1); g4->SetLineColor(2); g5->SetMarkerColor(1); g5->SetMarkerStyle(1); g5->SetLineColor(1); Double_t ymax = 300., xmax=3650.; g1->SetMaximum(ymax); g1->GetYaxis()->SetTitle("Full Depletion Voltage (V)"); g1->GetYaxis()->SetTitleSize(0.04); g1->GetYaxis()->SetTitleFont(132); g1->GetYaxis()->SetLabelSize(0.04); g1->GetYaxis()->SetLabelFont(132); g1->GetYaxis()->SetTitleOffset(1.1); g1->GetXaxis()->SetTitle("Days"); g1->GetXaxis()->SetTitleSize(0.04); g1->GetXaxis()->SetTitleFont(132); g1->GetXaxis()->SetLabelSize(0.04); g1->GetXaxis()->SetLabelFont(132); g1->GetXaxis()->SetTitleOffset(1.0); g1->GetXaxis()->SetRangeUser(0.,xmax); g1->Draw("ALP"); g2->Draw("SAME LP"); g3->Draw("SAME LP"); g4->Draw("SAME LP"); g5->Draw("SAME LP"); // TLine *b= new TLine(0,0, 0,ymax); b->SetLineWidth(2); b->Draw(); TLine *b= new TLine(0,0, xmax,0); b->SetLineWidth(2); b->Draw(); TLine *b= new TLine(0,ymax, xmax,ymax); b->SetLineWidth(2); b->Draw(); TLine *b= new TLine(xmax,0, xmax,ymax); b->SetLineWidth(2); b->Draw(); // TLine z1(365,0, 365,300.); z1->SetLineStyle(3); z1->Draw(); TLine z2(2*365,0, 2*365,300.); z2->SetLineStyle(3); z2->Draw(); TLine z3(3*365,0, 3*365,300.); z3->SetLineStyle(3); z3->Draw(); TLine z4(4*365,0, 4*365,300.); z4->SetLineStyle(3); z4->Draw(); TLine z5(5*365,0, 5*365,300.); z5->SetLineStyle(3); z5->Draw(); TLine z6(6*365,0, 6*365,300.); z6->SetLineStyle(3); z6->Draw(); TLine z7(7*365,0, 7*365,300.); z7->SetLineStyle(3); z7->Draw(); TLine z8(8*365,0, 8*365,300.); z8->SetLineStyle(3); z8->Draw(); TLine z9(9*365,0, 9*365,300.); z9->SetLineStyle(3); z9->Draw(); TLine x1(0,1*50, 10*365,1*50); x1->SetLineStyle(3); x1->Draw(); TLine x2(0,2*50, 10*365,2*50); x2->SetLineStyle(3); x2->Draw(); TLine x3(0,3*50, 10*365,3*50); x3->SetLineStyle(3); x3->Draw(); TLine x4(0,4*50, 10*365,4*50); x4->SetLineStyle(3); x4->Draw(); TLine x5(0,5*50, 10*365,5*50); x5->SetLineStyle(3); x5->Draw(); leg = new TLegend(0.12 ,0.6 ,0.6,0.88); leg->SetFillColor(10); leg->SetBorderSize(2); leg->SetTextFont(132); //leg->SetTextSize(12); leg->SetHeader(" Access Scenarios"); leg->AddEntry(g1,"2 days at 20^{o}C, 28 days at 17^{o}C","l"); leg->AddEntry(g2,"2 days at 20^{o}C, 14 days at 17^{o}C","L"); leg->AddEntry(g3,"2 days at 20^{o}C, 7 days at 17^{o}C","L"); leg->AddEntry(g4,"2 days at 20^{o}C","L"); leg->AddEntry(g5,"no maintenance (always -7^{o}C)","L"); leg->Draw(); }