{ //=========Macro generated from canvas: c1/c1 //========= (Mon Aug 8 16:03:23 2011) by ROOT version5.18/00b TCanvas *c1 = new TCanvas("c1", "c1",12,32,699,499); gStyle->SetOptFit(1); c1->SetHighLightColor(2); c1->Range(-127020,-11.11375,1143180,100.0237); c1->SetBorderSize(2); c1->SetFrameFillColor(0); TGraph *graph = new TGraph(9); graph->SetName("Graph"); graph->SetTitle("OLO2 Current vs Right BCM D10 Rate (2254)"); graph->SetFillColor(1); graph->SetMarkerColor(4); graph->SetMarkerStyle(22); graph->SetPoint(0,924006.6,80.8457); graph->SetPoint(1,601386.5,49.5059); graph->SetPoint(2,247380.8,20.4318); graph->SetPoint(3,122609.9,10.1662); graph->SetPoint(4,62640.26,5.1687); graph->SetPoint(5,24599.14,2.0459); graph->SetPoint(6,12062.84,0.9956); graph->SetPoint(7,5854.873,0.4839); graph->SetPoint(8,2476.015,0.2031); TH1 *Graph3 = new TH1F("Graph3","OLO2 Current vs Right BCM D10 Rate (2254)",100,0,1016160); Graph3->SetMinimum(0); Graph3->SetMaximum(88.90996); Graph3->SetDirectory(0); Graph3->SetStats(0); Graph3->GetXaxis()->SetTitle("BCM Rate (Hz)"); Graph3->GetYaxis()->SetTitle("OLO2 Current (#muA)"); graph->SetHistogram(Graph3); TF1 *pol1 = new TF1("pol1","pol1",2476.015,924006.6); pol1->SetFillColor(19); pol1->SetFillStyle(0); pol1->SetLineWidth(3); pol1->SetChisquare(7.015605); pol1->SetParameter(0,-0.3233104); pol1->SetParError(0,0.4449786); pol1->SetParLimits(0,0,0); pol1->SetParameter(1,8.624819e-05); pol1->SetParError(1,1.172441e-06); pol1->SetParLimits(1,0,0); graph->GetListOfFunctions()->Add(pol1); TPaveStats *ptstats = new TPaveStats(0.5996593,0.2030457,0.9608177,0.3654822,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(2); ptstats->SetFillColor(19); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("#chi^{2} / ndf = 7.016 / 7"); text = ptstats->AddText("p0 = -0.3233 #pm 0.445 "); text = ptstats->AddText("p1 = 8.625e-05 #pm 1.172e-06 "); ptstats->SetOptStat(0); ptstats->SetOptFit(111); ptstats->Draw(); graph->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(graph->GetListOfFunctions()); graph->Draw("ap"); TPaveText *pt = new TPaveText(0.01,0.9401777,0.6773595,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(2); pt->SetFillColor(19); text = pt->AddText("OLO2 Current vs Right BCM D10 Rate (2254)"); pt->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }