Selecting a curve trough an axes

I am trying to build an application with "guide" where the user is asked to select one curve among several curves by clicking on the screen. The curves are drawn using a set of points using the plot function. Is there any special command to do the selection?
Thanks a lot in advance

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 26 Mar 2013
Edited: Azzi Abdelmalek on 26 Mar 2013
h=gco
x=get(h,'Xdata');
y=get(h,'Ydata')

2 Comments

Thank you Azzi for your help. But I still don't know how to pick a curve to retrieve the X and Y data. I was trying to use "ginput" but it doesn't help in this case. Do you have any idea how to select a curve using the cursor?
Just click on the curve you want and use
h=gco
x=get(h,'Xdata');
y=get(h,'Ydata')

Sign in to comment.

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Asked:

on 26 Mar 2013

Community Treasure Hunt

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

Start Hunting!