12 TCanvas *c1 =
new TCanvas(
"c1",
"A Simple Graph Example",200,10,700,500);
18 for (Int_t i=0;i<n;i++) {
20 y[i] = 10*sin(x[i]+0.2);
21 printf(
" i %i %f %f \n",i,x[i],y[i]);
23 TGraph *gr =
new TGraph(n,x,y);
26 gr->SetMarkerColor(4);
27 gr->SetMarkerStyle(21);
28 gr->SetTitle(
"a simple graph");
29 gr->GetXaxis()->SetTitle(
"X title");
30 gr->GetYaxis()->SetTitle(
"Y title");
35 c1->GetFrame()->SetBorderSize(12);