Update axes problem in GUI

4 Ansichten (letzte 30 Tage)
Mus'ab Ahmad
Mus'ab Ahmad am 25 Jun. 2015
Kommentiert: Mus'ab Ahmad am 2 Jul. 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!
<<
>>

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 25 Jun. 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.)

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by