I created a gui with MATLAB's GUI Builder. After some changing around, an image of an old plot is still loaded into the gui on start up. How can I tell MATLAB to disregard that old plot?
I added a toolbar by adding
set(hObject,'toolbar','figure');
into the "gui_OpeningFcn". Now I decided that I don't want the toolbar in my gui any longer. But when I remove this line, the toolbar is still created. How do I tell MATLAB not to load the old stuff anymore? And where do those settings get stored anyway?
EDIT: I investigated a little bit, and this behaviour can be reproduced as follows:
- create a new gui with the GUI builder and add plot
- add the line "set(hObject,'toolbar','figure');" into the "*_OpeningFcn"
- add a simple function into the plot (adding something like "plot(handles.axes1,[1:10], [1:10])" into the "*_OpeningFcn" will do)
- run the gui and save the figure by clicking the save button in the toolbar
- now when I remove "set(hObject,'toolbar','figure');" and "plot(handles.axes1,[1:10], [1:10])" from "*_OpeningFcn" and run the gui, the toolbar and the plot will still be displayed
I am sure this behaviour is intentional. But where are those settings stored, so I can reverse them?