From: Dave Hathaway on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <6dbb6f9d-6b5c-4ac9-a5ba-099928bc4fae(a)g11g2000yqe.googlegroups.com>...
> Have you tried creating it in GUIDE and then exporting it to an m-file
> from GUIDE?

The axes content is created as part of the execution. In the end, the program will be compiled, and won't be available within GUIDE.

"Oliver Woodford" <o.j.woodford.98(a)cantab.net> wrote in message <hp4f91$6dp$1(a)fred.mathworks.com>...
> "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

Oliver,

Thanks for the feedback and pointers to the routines. I'm having errors kicked back. For reference, figure1 is the GUI, with controls that determine what axes1 displays.

if I try,

fig = isolate_subplot(handles.figure1);

the processing exits with "Too many axes found". (But there's only 1?)

If I try,

fig = isolate_subplot(handles.axes1);

I get many errors of the sort,

Warning: sun.jdbc.odbc.JdbcOdbcConnection(a)a0c35b is not serializable
Warning: com.mathworks.toolbox.database.databaseConnect(a)1c6dc2b is not serializable
....etc... with line numbers interposed.

I go on to use,

hgsave (fig,filename);

but the resulting .fig is not opened when I try to open it.

Ideas?

Dave
From: Oliver Woodford on
"Dave Hathaway" wrote:
> I go on to use,
>
> hgsave (fig,filename);
>
> but the resulting .fig is not opened when I try to open it.
>
> Ideas?
>
> Dave

I don't think I can be of much more help, other than to state what I believe the basic work flow should be:

1. Copy the figure.
2. Delete all the gui objects in the new figure.
3. Save the new figure.

Regards,
Oliver
From: Dave Hathaway on
"Oliver Woodford" <o.j.woodford.98(a)cantab.net> wrote in message <hphthl$opv$1(a)fred.mathworks.com>...
> I don't think I can be of much more help, other than to state what I believe the basic work flow should be:
>
> 1. Copy the figure.
> 2. Delete all the gui objects in the new figure.
> 3. Save the new figure.
>
> Regards,
> Oliver

Thank you. That would be an alternate to creating a new figure.

I do appreciate your help.

Dave