Update axes problem in GUI

1 次查看(过去 30 天)
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!
<<
>>

采纳的回答

Walter Roberson
Walter Roberson 2015-6-25
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.)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by