{
   //Draw a simple graph
   // To see the output of this macro, click begin_html <a href="gif/graph.gif">here</a>. end_html
   //Author: Rene Brun
   gROOT->Reset();
   TCanvas *c1 = new TCanvas("c1","access number",200,10,700,500);

   c1->SetFillColor(42);
   c1->SetGrid();

   ifstream ifile;
   Int_t data[1000];
   Int_t num[1000];
   Int_t nlines = 0;
   ifile.open("access.dat");
   while(1) {
	ifile >> num[nlines] >> data[nlines];
	nlines++;
	if(!ifile.good())
		break;
   }
   ifile.close();
   const Int_t n = 135;
   Int_t x[n], y[n];
   for (Int_t i=0;i<n;i++) {
     x[i] = i;
     y[i] = data[i];
     printf(" i %i %d %d \n",i,x[i],y[i]);
   }
   gr = new TGraph(n,x,y);
   gr->SetLineColor(1);
   gr->SetLineWidth(2);
   gr->SetMarkerColor(4);
   gr->SetMarkerStyle(21);
   gr->SetTitle("access number of this site");
   gr->GetXaxis()->SetTitle("days");
   gr->GetYaxis()->SetTitle("The access number");
   gr->Draw("AL");
   TF1 f1("f1", "pol1");
	f1.SetLineWidth(2);
	f1.SetLineColor(2);
	//f1.SetParameters(2.437,-0.367,0.001);
	gr.Fit("f1");

	TLatex l;
	l.SetTextAlign(12);
	l.SetTextSize(0.04);
	l.DrawLatex(20,350, "f(x)=12.4#pm0.8x+456.6#pm 60.2  #chi^{2}=1.6#times10^{7} NDF=133");


   // TCanvas::Update() draws the frame, after which one can change it
   c1->Update();
   c1->GetFrame()->SetFillColor(21);
   c1->GetFrame()->SetBorderSize(12);
   c1->Modified();

   /* 
Minimizer is Linear
Chi2                      =     1.56653e+007
NDf                       =     132
Par_0                     =     627.135         +/-     87.6463
Par_1                     =     4.76514         +/-     3.02247
Par_2                     =     0.057407        +/-     0.0218295
	*/ 
}

