Publish with no output to screen

Hi all.
I'm using publish to create a number of figures by a loop. When i do this the figures pop up on screen and I don't want that. I haven't been able to find out how to turn this off. Can someone help?
Thanks

 Réponse acceptée

Walter Roberson
Walter Roberson le 26 Mai 2011

0 votes

I don't know if this will work, but you could try
set(0,'DefaultFigureVisibility','off')
Any figure created after that (in the session) should, in theory, need to be explicitly set to Visibility on in order to display on the screen.

3 commentaires

Mads
Mads le 26 Mai 2011
Thx. It does not seem to work for me though. I get:
>> set(0,'DefaultFigureVisibility','off')
??? Error using ==> set
Invalid property found.
Object Name : figure
Property Name : 'Visibility'.
Walter Roberson
Walter Roberson le 26 Mai 2011
Sorry, that should have been
set(0,'DefaultFigureVisible','off')
Mads
Mads le 26 Mai 2011
Thank you, works great.

Connectez-vous pour commenter.

Plus de réponses (1)

Mads
Mads le 26 Mai 2011

0 votes

Hi again. It turns out that this options setting also means that publish does not create the pictures. Do you have another suggestion?
Thanks.

1 commentaire

Walter Roberson
Walter Roberson le 26 Mai 2011
Sorry, I do not know how publish works internally.
The circumstances under which the "print" command can work without a display are described in the documentation for "print". I do not know, though, if it is "print" that is used by publish.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Interactive Control and Callbacks dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by