GUI manual data selection

6 vues (au cours des 30 derniers jours)
Lukas
Lukas le 19 Avr 2012
Is it possible to have the user select a data value from a plot using a cursor click on the plot?

Réponse acceptée

Jan
Jan le 19 Avr 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'));
  1 commentaire
Lukas
Lukas le 19 Avr 2012
Thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by