From: Gauri on
Everytime I run the publish function, a figure is opened and closed although I have no figures in the m-file which I am publishing. Can somebody explain, why is the figure being generated?
From: Wayne King on
"Gauri " <bhagwat.gau(a)gmail.com> wrote in message <i0s9qf$a0$1(a)fred.mathworks.com>...
> Everytime I run the publish function, a figure is opened and closed although I have no figures in the m-file which I am publishing. Can somebody explain, why is the figure being generated?

Hi Gauri, A clean, white figure is generated as part of the process for generating the document object model. The figure is created as your code is searched for any inline images that need to be created. publish.m of course doesn't know ahead of time whether you have them or not.
If you had any images in the code, you would see them appear in the figure. The figure is cleaned up at the end.

Wayne
From: Gauri on
"Wayne King" <wmkingty(a)gmail.com> wrote in message <i0scmg$3k4$1(a)fred.mathworks.com>...
> "Gauri " <bhagwat.gau(a)gmail.com> wrote in message <i0s9qf$a0$1(a)fred.mathworks.com>...
> > Everytime I run the publish function, a figure is opened and closed although I have no figures in the m-file which I am publishing. Can somebody explain, why is the figure being generated?
>
> Hi Gauri, A clean, white figure is generated as part of the process for generating the document object model. The figure is created as your code is searched for any inline images that need to be created. publish.m of course doesn't know ahead of time whether you have them or not.
> If you had any images in the code, you would see them appear in the figure. The figure is cleaned up at the end.
>
> Wayne

Hi Wayne,
Thanks a tonne!

Cheers,
Gauri
From: Matthew Simoneau on
Note also there's a preference to disable this, if you like. It's available as the option useNewFigure if you're publishing from the command line and the as in your publishing configuration as "Use new figure" if you're publishing from the Editor.

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/publish.html
http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/briymz8-1.html#briymz8-7