How can I save a figure as a '.bmp' file in MATLAB 7.2 (R2006a) if my figure visible property is turned off?
17 views (last 30 days)
Show older comments
I execute the following commands in MATLAB 7.2 (R2006a):
peaks;
set(gcf,'visible','off');
saveas(gcf,'myfile.bmp');
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
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')
0 Comments
More Answers (0)
See Also
See Also
Categories
Find more on Graphics Object Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!