GUI manual data selection

1 visualizzazione (ultimi 30 giorni)
Lukas
Lukas il 19 Apr 2012
Is it possible to have the user select a data value from a plot using a cursor click on the plot?

Risposta accettata

Jan
Jan il 19 Apr 2012
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'));

Più risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by