{ //=========Macro generated from canvas: c1/c1 //========= (Mon Aug 8 13:47:03 2011) by ROOT version5.18/00b TCanvas *c1 = new TCanvas("c1", "c1",743,85,699,499); gStyle->SetOptFit(1); c1->SetHighLightColor(2); c1->Range(-0.1133892,-11.27751,1.020503,101.4976); c1->SetBorderSize(2); c1->SetFrameFillColor(0); TGraph *graph = new TGraph(9); graph->SetName("Graph"); graph->SetTitle("OLO2 vs BCM1 (BcmLog_171)"); graph->SetFillColor(1); graph->SetMarkerColor(4); graph->SetMarkerStyle(22); graph->SetPoint(0,0.824845,82.0364); graph->SetPoint(1,0.506013,49.523); graph->SetPoint(2,0.206083,20.2049); graph->SetPoint(3,0.102057,10.0869); graph->SetPoint(4,0.052297,5.1639); graph->SetPoint(5,0.020562,2.0276); graph->SetPoint(6,0.010129,1.0019); graph->SetPoint(7,0.004915,0.4812); graph->SetPoint(8,0.002157,0.1998); TH1 *Graph1 = new TH1F("Graph1","OLO2 vs BCM1 (BcmLog_171)",100,0,0.9071138); Graph1->SetMinimum(0); Graph1->SetMaximum(90.22006); Graph1->SetDirectory(0); Graph1->SetStats(0); Graph1->GetXaxis()->SetTitle("BCM1 voltage (V)"); Graph1->GetYaxis()->SetTitle("OLO2 current (#muA)"); graph->SetHistogram(Graph1); TF1 *pol1 = new TF1("pol1","pol1",0.002157,0.824845); pol1->SetFillColor(19); pol1->SetFillStyle(0); pol1->SetLineWidth(3); pol1->SetChisquare(0.4802084); pol1->SetParameter(0,-0.06890053); pol1->SetParError(0,0.1156103); pol1->SetParLimits(0,0,0); pol1->SetParameter(1,99.09772); pol1->SetParError(1,0.3481225); pol1->SetParLimits(1,0,0); graph->GetListOfFunctions()->Add(pol1); TPaveStats *ptstats = new TPaveStats(0.60477,0.2030457,0.9659284,0.3654822,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(2); ptstats->SetFillColor(19); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("#chi^{2} / ndf = 0.4802 / 7"); text = ptstats->AddText("p0 = -0.0689 #pm 0.1156 "); text = ptstats->AddText("p1 = 99.1 #pm 0.3481 "); 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.4712266,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(2); pt->SetFillColor(19); text = pt->AddText("OLO2 vs BCM1 (BcmLog_171)"); pt->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }