Selective retaining of graphic object in App Designer
3 views (last 30 days)
Show older comments
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 Comments
J. Alex Lee
on 14 Aug 2020
ok that's clearer. maybe i should have just suggested for you to post a minimal example of your old code.
Answers (0)
See Also
Categories
Find more on Animation 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!