{ const Int_t N1 = 10; const Int_t N2 = 6; Int_t NMax, in; Float_t x1[N1], x2[N2], y1[N1], y2[N2],x3[N1], x4[N2], y3[N1], y4[N2], step, dir; y1[0] = 5.0; y2[0] = 0.1; y3[0] = 2.6; y4[0] = 0.7; step = 0.5; x1[0] = 0.0; x2[0] = 1.5; x3[0] = 0.5; x4[0] = 1.0; dir = 1.0; for (in=1; inN1/2) dir = -1.0; x1[in] = (Float_t) in; y1[in] = y1[in-1]+(2.0*step*dir); } dir = 1.0; for (in=1; inGetYaxis()->SetLabelOffset(0.04); inputSpec3->GetYaxis()->SetLabelOffset(0.08); inputSpec2->GetYaxis()->SetLabelSize(0.02); inputSpec3->GetYaxis()->SetLabelSize(0.02); inputSpec4->GetYaxis()->SetLabelSize(0.02); TH1F *h1 = inputSpec->GetHistogram(); h1->Scale(0.1); h1->SetXTitle("X title"); h1->SetYTitle("Y title"); TCanvas *c1 = new TCanvas("c1", "Intensity of LED 1",0, 0, 800, 600); TPad *pad1 = new TPad("pad1","",0,0,1,1); TPad *pad2 = new TPad("pad2","",0,0,1,1); pad2->SetFillStyle(4000); pad2->SetFrameFillStyle(0); TPad *pad3 = new TPad("pad3","",0,0,1,1); pad3->SetFillStyle(4000); pad3->SetFrameFillStyle(0); TPad *pad4 = new TPad("pad4","",0,0,1,1); pad4->SetFillStyle(4000); pad4->SetFrameFillStyle(0); pad1->Draw(); pad1->cd(); inputSpec->SetMarkerStyle(29); inputSpec->SetMarkerColor(kBlack+2); inputSpec->SetLineColor(kBlack); inputSpec->GetXaxis()->SetLimits(0.,9.); inputSpec->Draw("ALP"); TH1F *h2 = inputSpec2->GetHistogram(); TAxis *Ay2 = h2->GetYaxis(); Ay2->SetRangeUser(0.0, 0.5); TH1F *h3 = inputSpec3->GetHistogram(); TAxis *Ay3 = h3->GetYaxis(); Ay3->SetRangeUser(0.0, 10); TH1F *h4 = inputSpec4->GetHistogram(); TAxis *Ay4 = h4->GetYaxis(); Ay4->SetRangeUser(0.0, 5); pad2->Draw(); pad2->cd(); inputSpec2->SetMarkerStyle(29); inputSpec2->SetMarkerColor(kRed+2); inputSpec2->SetLineColor(kRed); inputSpec2->GetXaxis()->SetLimits(0.,9.); inputSpec2->GetXaxis()->SetAxisColor(kRed); inputSpec2->GetXaxis()->SetLabelColor(kRed); inputSpec2->GetYaxis()->SetAxisColor(kRed); inputSpec2->GetYaxis()->SetLabelColor(kRed); inputSpec2->Draw("LPAY+"); pad3->Draw(); pad3->cd(); inputSpec3->SetMarkerStyle(29); inputSpec3->SetMarkerColor(kGreen+2); inputSpec3->SetLineColor(kGreen); inputSpec3->GetXaxis()->SetLimits(0.,9.); inputSpec3->GetXaxis()->SetAxisColor(kGreen); inputSpec3->GetXaxis()->SetLabelColor(kGreen); inputSpec3->GetYaxis()->SetAxisColor(kGreen); inputSpec3->GetYaxis()->SetLabelColor(kGreen); inputSpec3->Draw("LPAY+"); pad4->Draw(); pad4->cd(); inputSpec4->SetMarkerStyle(29); inputSpec4->SetMarkerColor(kBlue+2); inputSpec4->SetLineColor(kBlue); //mg2->Add(inputSpec4,"LPY+"); inputSpec4->GetXaxis()->SetLimits(0.,9.); inputSpec4->GetXaxis()->SetAxisColor(kBlue); inputSpec4->GetXaxis()->SetLabelColor(kBlue); inputSpec4->GetYaxis()->SetAxisColor(kBlue); inputSpec4->GetYaxis()->SetLabelColor(kBlue); inputSpec4->Draw("LPAY+"); }