reset GUI axes properties, including position etc
Mostrar comentarios más antiguos
Hello,
I have an axes object within a GUI that is subsequently used for different images/plots.
How can i reset all properies of the axes object befor using it again?
i tried the cla and reset command, but it does not restore the original size (important when turning colorbars on and off) nor do the caxis values get reset. I could hardcode these things, but isthere a convenient way?
i thought about copying the axes handle during startup of the gui and paste it later, but i did not succeed:
%...
function gui_OpeningFcn(hObject,eventdata,handles,varargin)
handles.output=hObject;
a=get(handles.myaxes);
handles.myaxesbackup=a;
guidata(hObject);
function pushbutton1_Callback(hObject,eventdata,handles)
% do something with the axes, e.g. plot
function pushbutton2_Callback(hObject,eventdata,handles)
set(handles.myaxes)=handles.myaxesbackup; % <== POINT OF THIS QUESTION
% do something ele with my axes
anybody can help me out? The problem i try to solve is that the appearence of plots on the axes depend on what was done before with the plot. for example, using colorbar decreases the size of the x-axis, and colormaps are taken from the previous plot. thanks.
1 comentario
carmen
el 13 de Mzo. de 2012
Respuestas (0)
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!