Axes are not refreshing in Matlab GUIDE
Show older comments
In a GUI application , placed a pop-up-menu, with two values 1 & 2. When the index of pop-up-menu is changed I want to plot a figure in gui ( not in a separate window) . Below code is written under pop-up-menu callback function, its working but the axis and titles are not updating or refreshing.
menuIndex = get(handles.popupmenu1, 'value');
figure;
if menuIndex == 1
plot(1:10);
title('title1');
else
plot(sin(1:10));
title('title2');
end
ax = findobj(gcf,'type','axes','-or','Tag','legend','-or','Tag','Colorbar');
hCopy= copyobj(ax, handles.figure1);
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!