GUI manual data selection

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 日

0 投票

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 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

タグ

質問済み:

2012 年 4 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by