{ //=========Macro generated from canvas: c1/c1 //========= (Fri Jul 29 09:37:38 2011) by ROOT version5.26/00 TCanvas *c1 = new TCanvas("c1", "c1",14,34,700,500); gStyle->SetOptFit(1); c1->SetHighLightColor(2); c1->Range(-7.33276,93079.16,98.7014,1638994); c1->SetBorderSize(2); c1->SetFrameFillColor(0); TGraph *graph = new TGraph(8); graph->SetName("Graph"); graph->SetTitle("Luminosity #6 Rate vs Current"); graph->SetFillColor(1); graph->SetMarkerColor(4); graph->SetMarkerStyle(22); graph->SetPoint(0,10.25073,353188); graph->SetPoint(1,20.46799,498651); graph->SetPoint(2,30.83199,646811); graph->SetPoint(3,41.00092,792680); graph->SetPoint(4,51.23747,938500); graph->SetPoint(5,61.42084,1084970); graph->SetPoint(6,71.2164,1231150); graph->SetPoint(7,80.96556,1382160); TH1F *Graph9 = new TH1F("Graph9","Luminosity #6 Rate vs Current",100,3.179248,88.03705); Graph9->SetMinimum(250290.8); Graph9->SetMaximum(1485057); Graph9->SetDirectory(0); Graph9->SetStats(0); Graph9->GetXaxis()->SetTitle("Current (#muA)"); Graph9->GetYaxis()->SetTitle("Luminosity Scaler Rate (Hz)"); graph->SetHistogram(Graph9); TF1 *pol1 = new TF1("pol1","pol1",3.179248,88.03705); pol1->SetFillColor(19); pol1->SetFillStyle(0); pol1->SetLineWidth(3); pol1->SetChisquare(1.469489e+08); pol1->SetNDF(6); pol1->SetParameter(0,200751.6); pol1->SetParError(0,3879.401); pol1->SetParLimits(0,0,0); pol1->SetParameter(1,14486.16); pol1->SetParError(1,75.39448); pol1->SetParLimits(1,0,0); graph->GetListOfFunctions()->Add(pol1); TPaveStats *ptstats = new TPaveStats(0.6106322,0.2266949,0.9712644,0.3855932,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(2); ptstats->SetFillColor(19); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("#chi^{2} / ndf = 1.469e+08 / 6"); text = ptstats->AddText("p0 = 2.008e+05 #pm 3879 "); text = ptstats->AddText("p1 = 1.449e+04 #pm 75.39 "); 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.9390678,0.4868966,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(2); pt->SetFillColor(19); text = pt->AddText("Luminosity #6 Rate vs Current"); pt->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }