Azzera filtri
Azzera filtri

Update axes problem in GUI

1 visualizzazione (ultimi 30 giorni)
Mus'ab Ahmad
Mus'ab Ahmad il 25 Giu 2015
Commentato: Mus'ab Ahmad il 2 Lug 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!
<<
>>

Risposta accettata

Walter Roberson
Walter Roberson il 25 Giu 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.)

Più risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by