void focus() { gROOT->SetStyle("Plain"); TCanvas *c1; c1=new TCanvas("c1","Canvas",800,600); //gPad->SetPadLeftMargin(1); gStyle->SetPadLeftMargin(0.12); c1->UseCurrentStyle(); //gROOT->ForceStyle(); const unsigned ne(11); double e[ne]={17,74,155,197,202,169,186,157,97,47,35}; double x[ne]={-0.2,-0.1,0.0,0.05,0.075,0.1,0.1,0.15,0.2,0.25,0.3}; TGraph *tg; tg=new TGraph(ne); tg->SetTitle(";Optical focus reading (mm);Laser signal (DTU)"); for(int j(0);j<(int)ne;j++) { tg->SetPoint(j,x[j],e[j]); } tg->SetMarkerStyle(20); tg->SetMarkerSize(1.5); tg->SetMarkerColor(2); tg->SetLineColor(2); //tg->GetYaxis()->SetRangeUser(0,15); //tg->GetXaxis()->SetRangeUser(-0.4,0.5); tg->GetXaxis()->SetLimits(-0.3,0.4); tg->GetYaxis()->SetTitleOffset(1.2); tg->Draw("AP"); c1->Update(); c1->Print("../focus.png"); }