Update axes problem in GUI

1 vue (au cours des 30 derniers jours)
Mus'ab Ahmad
Mus'ab Ahmad le 25 Juin 2015
Commenté : Mus'ab Ahmad le 2 Juil 2015
I have a matlab gui that contains 5 plots (axes1 (main), axes2 and axes3 for value Arm (inside panel 17), and another axes4 and axes5 for value Index Table (inside panel 18). Values Lead Screw.., Rack and Pinion and Belt.. are not associated with any plots apart from the main). Axes1 shall be updated (showing 5 different images) if a different value is selected from a popup menu. Other plots shall be appeared (by controlling the visibility on/off of panels 17 and 18) along with the updated axes1 plot if their corresponding values are selected. E.g. if value Arm is selected then 3 plots should appear, the same for value Index Table. Values Lead Screw.., Rack and Pinion and Belt.. show only the axes1 plot.
The problem is: whenever values Arm or Index Table are being selected, their associated 2 plots (axes2 and axes3, or axes4 and axes5) appear fine BUT the main plot (axes1) stopped being updated! even if I select any other value from the popup menu!
<<
>>

Réponse acceptée

Walter Roberson
Walter Roberson le 25 Juin 2015
So not imshow(data) but imshow(axes_handle, data) or imshow(data, 'Parent', axes_handle) .
(Better yet if the image is already present then set() it's CData to the new values instead of using imshow() which will remove the old object and create a new one.)
  1 commentaire
Mus'ab Ahmad
Mus'ab Ahmad le 2 Juil 2015
It works, thanks a lot :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by