Command 'plot3' clears functions which were added when an axes is created in GUIDE. Why?
Show older comments
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
Accepted Answer
More Answers (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 Comment
Alon Rozen
on 24 Jan 2017
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!