How can I save a figure as a '.bmp' file in MATLAB 7.2 (R2006a) if my figure visible property is turned off?

I execute the following commands in MATLAB 7.2 (R2006a):
peaks;
set(gcf,'visible','off');
saveas(gcf,'myfile.bmp');

 Accepted Answer

The SAVEAS function uses the '-dbitmap' option to print, which works by performing a screen capture. Since the figure is invisible, the data cannot be captured.
To workaround this, use the PRINT command to save the figure as a BMP-file.
print (gcf, '-dbmp', 'myfile.bmp')

More Answers (0)

Categories

Products

Release

R2006a

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!