"Ziv " <ziv.yekutieli@hotmail.com> wrote in message <ht6tlk$k4t$1@fred.mathworks.com>...
> Hi,
> I have two figures e.g. gugu.fig and lulu.fig )
> i want to place tham one next to the other and create gugululu.fig plot where gugu is on the right and lulu is on the left.
>
> can i call gugu and lulu from subplot? (wasn't able to do that).
>
> I've been reading some suggestions in this site, dealing with figure properties, copyobj, etc'. for some reason it didn't work (
>
> I'd appreciate an example for creating such a merge.
> thanks,
> ZiV
One way to do this is to extract xdata and ydata from existing figures, then re-plot these data in a new figure window as desired. For example,
open('gugu.fig');
h_gugu=get(gca,'Children');
x_gugu=get(h_gugu,'XData');
y_gugu=get(h_gugu,'YData');
open('lulu.fig');
h_lulu=get(gca,'Children');
x_lulu=get(h_lulu,'XData');
y_lulu=get(h_lulu,'YData');
figure
subplot(121)
plot(x_gugu,y_gugu);
subplot(122)
plot(x_lulu,y_lulu)
saveas(gcf,'gugululu','fig')
HTH
Yi
> Hi,
> I have two figures e.g. gugu.fig and lulu.fig )
> i want to place tham one next to the other and create gugululu.fig plot where gugu is on the right and lulu is on the left.
>
> can i call gugu and lulu from subplot? (wasn't able to do that).
>
> I've been reading some suggestions in this site, dealing with figure properties, copyobj, etc'. for some reason it didn't work (
>
> I'd appreciate an example for creating such a merge.
> thanks,
> ZiV
One way to do this is to extract xdata and ydata from existing figures, then re-plot these data in a new figure window as desired. For example,
open('gugu.fig');
h_gugu=get(gca,'Children');
x_gugu=get(h_gugu,'XData');
y_gugu=get(h_gugu,'YData');
open('lulu.fig');
h_lulu=get(gca,'Children');
x_lulu=get(h_lulu,'XData');
y_lulu=get(h_lulu,'YData');
figure
subplot(121)
plot(x_gugu,y_gugu);
subplot(122)
plot(x_lulu,y_lulu)
saveas(gcf,'gugululu','fig')
HTH
Yi