How do i make a 'pushbutton' plot a point?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jack
le 11 Juil 2014
Réponse apportée : Image Analyst
le 12 Juil 2014
%code
hbottom_left = uicontrol('Style','pushbutton',...
'String','Bottom Left','Position',[270,220,70,25]);
%end of code
I want this pushbutton to plot the point (0.5,0.5), i think i need to use the callback function but i dont know the exact code, could someone provide the exact code, thanks in advance.
0 commentaires
Réponse acceptée
Image Analyst
le 12 Juil 2014
Just right click on the button and say to view the callback. It will put you in the callback in the m-file. Then just write:
plot(0.5, 0.5, 'b*', 'MarkerSize', 15, 'LineWidth', 3); % Adjust as needed.
grid on;
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Interactive Control and Callbacks 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!