> 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.
The previous answers to this request involved opening the figures and copying the data (via get) or the objects themselves (via copyobj) into the third figure that combines them. Actually, the source figures do not need to become visible at all, if you use the hgload() function, as follows:
hFig = hgload(figFilename, struct('visible','off'));
Fortunately, there is a hack that you can use to get these objects without even needing to open the figures. The trick relies on the undocumented fact that FIG files are simply MAT files that contain all the HG (Handle Graphics) information in a very simple struct. You can simply read the contents of these FIG files using the load(figFileName,'-mat') function, and then use the struct2handle() function to place the requested handle(s) anywhere in the new figure.
Yair Altman
http://UndocumentedMatlab.com
> 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.
The previous answers to this request involved opening the figures and copying the data (via get) or the objects themselves (via copyobj) into the third figure that combines them. Actually, the source figures do not need to become visible at all, if you use the hgload() function, as follows:
hFig = hgload(figFilename, struct('visible','off'));
Fortunately, there is a hack that you can use to get these objects without even needing to open the figures. The trick relies on the undocumented fact that FIG files are simply MAT files that contain all the HG (Handle Graphics) information in a very simple struct. You can simply read the contents of these FIG files using the load(figFileName,'-mat') function, and then use the struct2handle() function to place the requested handle(s) anywhere in the new figure.
Yair Altman
http://UndocumentedMatlab.com