Redrawing a content of a subplot in programmatic gui using dedicated control in another subplot

1 view (last 30 days)
  • I am a novice in Matlab so this is a variation of a question asked in https://www.mathworks.com/matlabcentral/answers/311692-how-to-get-the-handles-of-a-subplot which I could not get running. To identify the problem, I drafted an example related to the management of handles and the use of callbacks to update subplots. The real case is a bit more complicated, but this one gives the idea.
  • The case is simple: we have three subplots. Top [1] and Bottom [3] subplots are populated with images and a panel with 3 buttons is located in the third spanning subplot [2,4]. The first and the third buttons should rotate the image in top and bottom subplots respectively and the third resets the image to restart the process.
  • Buttons partially work - they activate the actions in the target subplots
  • Pressing the buttons to redraw the panels after the rotation fails - why? any advice? thanks for your comments.

Accepted Answer

AlexanderM
AlexanderM on 30 Apr 2017
Update. The problem is solved using global to store the state of the image. It is not elegant but perhaps acceptable. Please share with me a solution that does not use global.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!