saving plot figures without opening

Hello, I would like to save some plot figures withoput displaying them on the screen. I used
set(fig, 'visible','off')
saveas(fig,'file.fig','fig')
set(fig, 'visible','on')
close(fig
But, what it savves is a blank .bmp file.
Does anyone have an idea?

Antworten (1)

Joseph Cheng
Joseph Cheng am 16 Sep. 2014

0 Stimmen

The saveas, from what i can understand, does a screen capture but since the figure is invisible there isn't anything there. try using the print command to get your bmp.
print (fig, '-dbmp', 'file.bmp')

Kategorien

Mehr zu Printing and Saving finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 16 Sep. 2014

Beantwortet:

am 16 Sep. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by