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);
Best Answer