Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8322305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:20:38+00:00 2026-06-08T23:20:38+00:00

Updated: I have a listplot of data and I would like to collect all

  • 0

Updated:

I have a listplot of data and I would like to collect all the data points within a specific boundary of a circle graphic that overlaps the listplot in Mathematica.

Is something like this possible?

The ellipse I have made is of the form

{c, s, \[Theta]} = 
 1 /. ComponentMeasurements[f, {"Centroid", "SemiAxes", "Orientation"}]
Show[Rasterize[p], Graphics[{Red, Rotate[Circle[c, s], \[Theta]]}]]

Can you help me fit your bottom-most solution into a form where I can input my ellipse with the Centroid, SemiAxes, and Orientation properties?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:20:41+00:00Added an answer on June 8, 2026 at 11:20 pm
    data = RandomReal[{0, 1}, {100, 2}]
    r = 1/5;
    center = {1/6, 1/4};
    sd = Select[data, EuclideanDistance[#, center] < r &]
    Show[ListPlot@data, 
         Graphics@Circle[center, r], 
         Graphics[{Red, PointSize[Large], Point@sd}], AspectRatio -> 1]
    

    Mathematica graphics

    Edit

    For an ellipse

    data = RandomReal[{0, 1}, {100, 2}]
    r = 1/5;
    f1 = {1/6, 1/4};
    f2 = {1/3, 1/5};
    sd = Select[data, EuclideanDistance[#, f1] + EuclideanDistance[#, f2] < r &]
    Show[ListPlot@data, 
         RegionPlot[EuclideanDistance[{x, y},f1] + EuclideanDistance[{x, y},f2] <r, 
                    {x, 0, 1}, {y, 0, 1}], 
         Graphics[{Red, PointSize[Large], Point@sd}], AspectRatio -> 1]
    

    Mathematica graphics

    Edit 2

    Better code

    data = RandomReal[{0, 1}, {100, 2}]
    r = 1/5;
    f1 = {1/6, 1/4};
    f2 = {1/3, 1/5};
    inside[{x_, y_}, {f1_, f2_}] := Sum[EuclideanDistance[{x, y}, i], {i, {f1, f2}}];
    sd = Select[data, inside[#, {f1, f2}] < r &];
    Show[ListPlot@data,
         RegionPlot[inside[{x, y}, {f1, f2}] < r, {x, 0, 1}, {y, 0, 1}],
         Graphics[{Red, PointSize[Large], Point@sd}],
      AspectRatio -> 1]
    

    Edit 3

    Here you have the whole thing translated to your ComponentMeasurements output

    (*{c,s,t}=1/.ComponentMeasurements[f,{"Centroid","SemiAxes",\
    "Orientation"}] *)
    c = {.3, .4}
    s = {.4, .2}
    t = Pi/8
    
    {s1, s2} = s
    center = {cx, cy} = c
    f = Sqrt[s1 s1 - s2 s2]
    f1 = {f1x, f1y} = {cx + f Cos[t], cy - f Sin[t]}
    f2 = {f2x, f2y} = {cx - f Cos[t], cy + f Sin[t]}
    r = 2 Sqrt[f f + s2 s2]
    
    data = RandomReal[{0, 1}, {100, 2}];
    
    sd = Select[data, EuclideanDistance[#, f1] + EuclideanDistance[#, f2] < r &];
    Show[
     ListPlot@data, 
     RegionPlot[ EuclideanDistance[{x, y}, f1] + EuclideanDistance[{x, y}, f2] < r,
                  {x, 0, 1}, {y, 0, 1}], 
     Graphics[{Red, PointSize[Large], Point@sd}], 
    AspectRatio -> 1]
    

    Mathematica graphics

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some problems with the following: I would like to plot many data
UPDATED: I have some table with sync_numbers, like this: --------------------- id | sync_number ---------------------
I have updated many records already, but when it came to a word that
I have updated my website. Previously there were links like these: http://example.com/bla-bla-bla?language=de . After
I have a WPF listbox and have updated the list item data template to
I have updated my code to look like this. When I run it though
Updated I have some huge data, which becomes a large table say table parent
UPDATED I have an application that updates a combobox based on the values selected
I have updated certain field in my database & that field has default value
UPDATE: I have updated my HTML. Now it works in all browsers except IE7.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.