Skip to main content
reduced point size in picture for better aesthetics
Source Link
Syed
  • 59.6k
  • 5
  • 40
  • 95

Using RegionMember:

SeedRandom[1];
pts = RandomReal[10, {10^5, 2}];
center = {5, 5};
radius = 2;
good = Select[pts, RegionMember[Disk[center, radius]]];
outside = Complement[pts, good];

ListPlot[{outside, good}
 , AspectRatio -> Automatic
 , PlotStyle -> {Directive[AbsolutePointSize[3]Directive[AbsolutePointSize[1], Red], 
   Directive[AbsolutePointSize[3]Directive[AbsolutePointSize[1], Darker@Green] }
 , Epilog -> {Circle[center, radius]
   }
 ]

enter image description hereenter image description here

Using RegionMember:

SeedRandom[1];
pts = RandomReal[10, {10^5, 2}];
center = {5, 5};
radius = 2;
good = Select[pts, RegionMember[Disk[center, radius]]];
outside = Complement[pts, good];

ListPlot[{outside, good}
 , AspectRatio -> Automatic
 , PlotStyle -> {Directive[AbsolutePointSize[3], Red], 
   Directive[AbsolutePointSize[3], Darker@Green] }
 , Epilog -> {Circle[center, radius]
   }
 ]

enter image description here

Using RegionMember:

SeedRandom[1];
pts = RandomReal[10, {10^5, 2}];
center = {5, 5};
radius = 2;
good = Select[pts, RegionMember[Disk[center, radius]]];
outside = Complement[pts, good];

ListPlot[{outside, good}
 , AspectRatio -> Automatic
 , PlotStyle -> {Directive[AbsolutePointSize[1], Red], 
   Directive[AbsolutePointSize[1], Darker@Green] }
 , Epilog -> {Circle[center, radius]
   }
 ]

enter image description here

Source Link
Syed
  • 59.6k
  • 5
  • 40
  • 95

Using RegionMember:

SeedRandom[1];
pts = RandomReal[10, {10^5, 2}];
center = {5, 5};
radius = 2;
good = Select[pts, RegionMember[Disk[center, radius]]];
outside = Complement[pts, good];

ListPlot[{outside, good}
 , AspectRatio -> Automatic
 , PlotStyle -> {Directive[AbsolutePointSize[3], Red], 
   Directive[AbsolutePointSize[3], Darker@Green] }
 , Epilog -> {Circle[center, radius]
   }
 ]

enter image description here