Selective retaining of graphic object in App Designer
3 次查看(过去 30 天)
显示 更早的评论
Hi! I am developing a code (rather re-writing an old code) in App Designer where I have displayed two grapahic objects: an image using pcolor and a contour (made of connected lines) using plot. Now, I want to set up a callback function using WindowButtonDownFcn and WindowButtonMotionFcn, where I can tweak the contour by adding more points, while keeping the displayed image intact.
I am experiencing a problem that I cannot animate the movement of the contour using WindowButtonMotionFcn if I use hold on. It does not clear the earlier plots, even when drawnow is used. I can animate the contour if I do not use hold on, but in that case the image is also gone and I have to redraw the image everytime during animation (which makes the process slow).
In earlier graphic system (prior to MATLAB 2014b), I have achieved the same by using hold on and drawnow when plotting. But, now it seems the selective updating of the graphic object is not working.
Any help will be appreciated. Thanks!
3 个评论
J. Alex Lee
2020-8-14
ok that's clearer. maybe i should have just suggested for you to post a minimal example of your old code.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!