Command 'plot3' clears functions which were added when an axes is created in GUIDE. Why?
Afficher commentaires plus anciens
Hi all,
I created an axes - My_Axes (using GUIDE but I think it doesn't matter) - and specified a 'ButtonDownFcn' to treat mouse clicks on the created graph. However, when I plot something on this axes using the the funcition 'plot3' the axes field 'ButtonDownFcn' is cleared! Of course, nothing happens when later I click with the mouse on the graph. Strangely, this is not the case when I create a graph using 'plot' (I didn't check all the other plotting functions). Why? Is this the way Matlab is suppose to treat axes?
Thanks,
Alon
Réponse acceptée
Plus de réponses (1)
I assume this is a bug. Which Matlab version an OS are you using?
Does it help to set the 'NextPlot' property of the axes object to 'add'? This is equivalent to hold on, but then an automatic replacement of the axes' content is disabled.
1 commentaire
Alon Rozen
le 24 Jan 2017
Catégories
En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!