Data cursor on GUI plot

조회 수: 5 (최근 30일)
Alex
Alex 2013년 11월 20일
편집: Reza Sadeghi 2020년 2월 25일
Hi, I have a GUI with a table and a plot as you can see: </matlabcentral/answers/uploaded_files/4822/guisanstitre.png>
I woudl like to put a Data cursor on my plot to get the value of points.
I try to do :
hPlot=plot(handles.axes1,courbe);figure(gcf) % display my plot
dcm_obj = datacursormode(hPlot);
datacursormode on;
set(dcm_obj,'UpdateFcn', @myupdatefcn )
but matlab return an error:
Error using datacursormode (line 144)
Invalid figure handle
Could you help me, maybe there is a better way to get a data cursor?
Thank you

답변 (2개)

Alex
Alex 2013년 11월 22일
Nobody can help me :(

Sébastien MAILFERT
Sébastien MAILFERT 2018년 9월 25일
Same problem, 5 years later :-(
  댓글 수: 1
Reza Sadeghi
Reza Sadeghi 2020년 2월 25일
편집: Reza Sadeghi 2020년 2월 25일
I think the following line may help you
[x,y] = ginput(1)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by