Prev: Matrix element to Matrix element-range mutiplication
Next: different matrix operations on columns without loops
From: Stratis Gavves on 26 May 2010 08:48 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 26 May 2010 09:20 "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 26 May 2010 09:32 "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 18 Jun 2010 05:00
"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) |