MATLAB: How to save contents of uipanel

guiguidesave guisubplotuipanel

Hi there,
I've been working a project and recently solved an issue of using subplots by switching to a uipanel in my gui from an axes.
The next step in the process is to save the figure displayed in the uipanel but I can't figure out how to.
I tried using
%set the axis as the parent of the image within the imshow command
handles.saveFigure = findobj(handles.uipanel5,'Type','figure');
but recieve a command window display of
saveFigure: [0×0 GraphicsPlaceholder]
How do I access the subplot within the panel so I can save it to a handle location for later export?

Best Answer

"using subplots by switching to a uipanel in my gui from an axes" - I do not understand what this means.
"save the figure displayed in the uipanel" - a figure is a figure and it cannot be displayed in an uipanel. uipanels are children of figures, not the other way around.
"How do I access the subplot within the panel" - you are looking for an axes, not for a figure.
handles.saveAxes = findobj(handles.uipanel5, 'Type', 'axes');