How to extract x, y data for particular/selected points from a scatter plot?

In a figure created using scatter plot in matlab, how do select particular points and extract x and y values for the same set of selected points?
regards,
Krishnendu

2 Comments

How you want to select? You want to select manually by clicking on plot? What data you have?

Sign in to comment.

 Accepted Answer

Read about getpts, ginput. These functions will help to pick points.
[x,y] = getpts() ; % double click to exit
[x,y] = ginput(4) ; % you can specify number of points

More Answers (1)

1 Comment

this also works, but because my scatter plots are curving in a certain way, selecting different points is easier with getpts. thank you so much for the help. it will deifinitely be helpful in other tasks.

Sign in to comment.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!