hi.
why does my code not plot my data points from min_pt to max_pt? it plots from 0 to max_pt, did i miss something before SetPoint()?
TGraph *g_resize (TGraph *g, Double_t min_pt, Double_t max_pt) {
Int_t i;
Double_t diff =max_pt- min_pt;
TGraph *gg_resize = new TGraph ();
Double_t *X = g->GetX();
Double_t *Y = g->GetY();
Double_t n = g->GetN();
for (i=0; i<n; i++) {
if (i >= min_pt && i <= max_pt) {
gg_resize -> SetPoint (diff, X[i], Y[i]);
printf ("X %f Y %f\n", X[i], Y[i]);
gg_resize->Draw("APL");
}
}
return gg_resize;
}
Thanks.
Frances