TGraph: fit only some points

Hi everyone!
I`ve got a TGraph with some points inside it; these points are distributed along two differents lines.
Is it possible to fit only some of them, which i select for example making a circle with the mouse around them??
I can’t distinguish between the two series of points while reading them from my data file!

I attach the image of my TGraph.

Thanks in advance

Andrea


You have 2 solutions
-SOLUTION 1 (recommended).
Create a new TGraph containing only the selected points (via TCutG::IsInside).

-SOLUTION 2: fit your TGraph and in your model function use TF1::RejectPoint.
see an example in $ROOTSYS/tutorials/fit/fitExclude.C

Rene