GUI manual data selection

조회 수: 6 (최근 30일)
Lukas
Lukas 2012년 4월 19일
Is it possible to have the user select a data value from a plot using a cursor click on the plot?

채택된 답변

Jan
Jan 2012년 4월 19일
Yes. The actual implementation depends on the type of the plot.
H = plot(1:10);
set(H, 'ButtonDownFcn', @myCallback);
function myCallback(ObjH, EvenData)
set(ObjH, 'Color', rand(1, 3));
AxesH = ancestor(ObjH, 'axes');
disp(get(AxesH, 'CurrentPoint'));
  댓글 수: 1
Lukas
Lukas 2012년 4월 19일
Thank you

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by