I have a function that creates a figure as below
mainfig = myfunction(x,y)
mainfig = figure('NumberTitle', 'off', 'Name', 'MyFigName');
h.tabgroup = uitabgroup(mainfig);
h.tab = uitab(h.tabgroup, 'Title', 'MyTabName');
h.panel = uipanel('Parent',h.tab);
ax = subplot(2,5,[1 6],'Parent',h.panel);
Now suppose the user calls the function, looks at the figure and then closes it (clicking on the " x " of the figure, top right corner)
I am then left (in the workspace) with the figure handle (mainfig)
Is it possible to re-open/re-create the figure as it was when generated? If yes, could you show an example?
If not, is there any other data I need to add in the output of myfunction in order to achieve that?
Thanks in advance