From: Dave Hathaway on
I have written a dialog box that allows certain customizations of a graph. I want to save the graph in a .fig so that I can edit the axis, change line colours, etc.

The figure tag is figure1
The axes tag is axes1

When I perform a

saveas(handles.axes1,'filename.fig');

I get an error:

Error using ==> open at 159
There is no 'WindowStyle' property in the 'axes' class.

Although I forget the sequence, I have also had the .fig contain all the GUI objects (radio buttons, push buttons, etc). I can't seem to recreate that now.

The problem remains... how do I save axes1, the graph inside the GUI?

Dave
From: ImageAnalyst on
Dave:
People commonly have problems with the variety of built-in ways of
saving figures (and seek help here). That's why export_fig() is
downloaded hundreds of times per week:
http://www.mathworks.com/matlabcentral/fileexchange/?term=author%3Awoodford
From: Dave Hathaway on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <de60fc95-cc5a-410f-8ff4-165a256e9086(a)k17g2000yqb.googlegroups.com>...
> Dave:
> People commonly have problems with the variety of built-in ways of
> saving figures (and seek help here). That's why export_fig() is
> downloaded hundreds of times per week:
> http://www.mathworks.com/matlabcentral/fileexchange/?term=author%3Awoodford

Thank you for the suggestion. The preference at this point is to somehow save the figure as a .fig file so that attributes like axis limits, etc, can be changed afterwards.

export_fig() does seem to be a nice way to publish the figure though.

Thanks,

Dave
From: ImageAnalyst on
Have you tried creating it in GUIDE and then exporting it to an m-file
from GUIDE?
From: Oliver Woodford on
"Dave Hathaway" wrote:
>
> Thank you for the suggestion. The preference at this point is to somehow save the figure as a .fig file so that attributes like axis limits, etc, can be changed afterwards.

Dave, export_fig contains code for exporting a single axes which could also be used to save a single axes in a .fig file. You need the functions isolate_subplot and copyfig from export_fig.m.

Oliver