// code for plotting reflectivity graph // Marieke Navin - June 2005 { gROOT->Reset(); // reset global variables gStyle->SetCanvasColor(10); // gStyle->SetTitleColor(10); gStyle->SetFrameFillColor(10); gStyle->SetOptStat(0); ifstream data; // declare a file to input from data.open("ptfeboth.dat"); // number of points to be plotted const Int_t n = 71; //careful with no of points! Float_t x[n], y[n], y2[n]; for(Int_t i=0;i>x[i]>>y[i]>>y2[i]; } for (Int_t i=0; iSetTitle("Reflectance of Pressed PTFE Powder (2 days data)"); inputSpec->GetXaxis()->SetTitle("Wavelength (nm)"); inputSpec->GetYaxis()->SetTitle("Spectral Reflectance"); inputSpec->SetMaximum(1.04); inputSpec->SetMinimum(0); inputSpec->Draw("AC"); gPad->Update(); inputSpec2->SetLineStyle(kDotted); inputSpec2->Draw("CP"); TLegend *legend = new TLegend(); //TLegend *legend = new TLegend(0.1,0.1,0.88,0.88, ""); legend->AddEntry(inputSpec, "27/06/05", "l"); legend->AddEntry(inputSpec2, "28/06/05", "l"); legend->Draw; }