float x[2] = { 0., 1. } ; float y[2] = { 2., 5. } ; cout << y[1] << endl; TGraph gr(2, x, y) ; gr.SetMarkerStyle(20); gr.SetMarkerColor(46); gr.DrawClone("AP") gr.Draw("APL") gr.Draw("APS") gr.Fit("pol1") // get della funzione che si chiama "pol1" e che e' stata creata da ROOT durante // l'operazione di fit TF1* myPol= (TF1*)gr.GetFunction("pol1"); // il Chi2 del fit myPol->GetChisquare(); TGraphErrors grerr(2, x, y, ex, ey) ; int a(0); int* pa = new int(0); delete pa; // per visualizzare sul grafico i valori del fit gStyle->SetOptFit(1111) const int MAX = 1000; float x[MAX]; x[0]=1; x[1]=2;