{ //=========Macro generated from canvas: c1/c1 //========= (Mon Aug 8 13:27:19 2011) by ROOT version5.18/00b TCanvas *c1 = new TCanvas("c1", "c1",707,50,699,499); gStyle->SetOptFit(1); c1->SetHighLightColor(2); c1->Range(-11.36225,-11.34813,102.2603,102.1331); c1->SetBorderSize(2); c1->SetFrameFillColor(0); TGraph *graph = new TGraph(9); graph->SetName("Graph"); graph->SetTitle("Faraday Cup vs OLO2 (BcmLog_170)"); graph->SetFillColor(1); graph->SetMarkerColor(4); graph->SetMarkerStyle(22); graph->SetPoint(0,82.6527,82.5499); graph->SetPoint(1,49.7287,49.6538); graph->SetPoint(2,20.4671,20.371); graph->SetPoint(3,10.1323,10.0597); graph->SetPoint(4,5.177,5.1663); graph->SetPoint(5,2.0292,2.0107); graph->SetPoint(6,0.9957,0.9861); graph->SetPoint(7,0.4781,0.4757); graph->SetPoint(8,0.1996,0.1988); TH1 *Graph1 = new TH1F("Graph1","Faraday Cup vs OLO2 (BcmLog_170)",100,0,90.89801); Graph1->SetMinimum(0); Graph1->SetMaximum(90.78501); Graph1->SetDirectory(0); Graph1->SetStats(0); Graph1->GetXaxis()->SetTitle("OLO2 current (#muA)"); Graph1->GetYaxis()->SetTitle("Faraday Cup current (#muA)"); graph->SetHistogram(Graph1); TF1 *pol1 = new TF1("pol1","pol1",0.1996,82.6527); pol1->SetFillColor(19); pol1->SetFillStyle(0); pol1->SetLineWidth(3); pol1->SetChisquare(0.005669252); pol1->SetParameter(0,-0.02105594); pol1->SetParError(0,0.01254499); pol1->SetParLimits(0,0,0); pol1->SetParameter(1,0.9988427); pol1->SetParError(1,0.0003790477); pol1->SetParLimits(1,0,0); graph->GetListOfFunctions()->Add(pol1); TPaveStats *ptstats = new TPaveStats(0.5979557,0.2081218,0.9591141,0.3705584,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(2); ptstats->SetFillColor(19); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("#chi^{2} / ndf = 0.005669 / 7"); text = ptstats->AddText("p0 = -0.02106 #pm 0.01254 "); text = ptstats->AddText("p1 = 0.9988 #pm 0.000379 "); 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.5700341,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(2); pt->SetFillColor(19); text = pt->AddText("Faraday Cup vs OLO2 (BcmLog_170)"); pt->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }