From: Stratis Gavves on
Hi!

If I have figure 2 : 6 let's say, if I want to put them into a new figure as subplots, what should I do? Is there any way to capture a figure as a struct variable or sth and then replot it inside a subplot? I found a relevant thread, suggesting this solution:

ax1 = get(fig1, 'CurrentAxes') ;
ax2 = subplot(2, 2, 1) ;
copyobj(allchild(fig1), ax2) ;

ax1 = get(fig2, 'CurrentAxes') ;
ax2 = subplot(2, 2, 2) ;
copyobj(allchild(fig2), ax2) ;

and so on. However, this method doesn't get the tick labels of the old axes and also the subplots are awkwardly plot, with weird axes ratio etc. Well, it's not a really crucial thing, but I think that it could really help people reducing the number of figures, when they just have too many and they are not from the same function so as to just use the subplot command.
From: Steven Lord on

"Stratis Gavves" <egavves(a)ee.auth.gr> wrote in message
news:htj5a4$mtt$1(a)fred.mathworks.com...
> Hi!
>
> If I have figure 2 : 6 let's say, if I want to put them into a new figure
> as subplots, what should I do?

You can't do what you asked directly; subplots are axes and figures cannot
be children of nor contained in axes.

To do what you want (copying the contents of the figures into another
figure) you could try copying the contents of each figure into a uiframe
inside the other figure using COPYOBJ.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com


From: Gernot on
"Stratis Gavves" <egavves(a)ee.auth.gr> wrote in message <htj5a4$mtt$1(a)fred.mathworks.com>...
> Hi!
>
> If I have figure 2 : 6 let's say, if I want to put them into a new figure as subplots, what should I do? Is there any way to capture a figure as a struct variable or sth and then replot it inside a subplot? I found a relevant thread, suggesting this solution:
>

What about
http://www.mathworks.com/matlabcentral/fileexchange/27713-montagefigures
?

Regard's
From: Stratis Gavves on
"Gernot " <test(a)gmx.at> wrote in message <htj7sk$e9h$1(a)fred.mathworks.com>...
> "Stratis Gavves" <egavves(a)ee.auth.gr> wrote in message <htj5a4$mtt$1(a)fred.mathworks.com>...
> > Hi!
> >
> > If I have figure 2 : 6 let's say, if I want to put them into a new figure as subplots, what should I do? Is there any way to capture a figure as a struct variable or sth and then replot it inside a subplot? I found a relevant thread, suggesting this solution:
> >
>
> What about
> http://www.mathworks.com/matlabcentral/fileexchange/27713-montagefigures
> ?
>
> Regard's

Very delayed answer, but thanks, this is what I was looking for. (at least in a first sight)