TakeAPicture

Take a snapshot of the current figure, save it as a png (or tiff or whatever) image
449 descargas
Actualizado 18 abr 2011

Ver licencia

Example Usage

>>ezplot(@(t)max(30*365*24-t,0),[0 33*365*24]);
>> xlabel 'age (hours)', ylabel 'what remains of your youth (hours)';
>>TakeAPicture -report

Documentation:
% Create and save a png picture from your figure.
%
% e.g.
% TakeAPicture % Take a picture
% TakeAPicture -inv % Take a picture and invert the colors
% TakeAPicture -auto % Use a default name and directory
% TakeAPicture('name','aaa','manualcrop',false) % Specify the name and don't crop
% TakeAPicture('-withfig','name','aaa') % Also save the .fig file and specify the name
% TakeAPicture('-withfig','colors','inv') % Also save the .fig file and invert colors
%
% Settings (enter as property-value pairs)
% 'name' : Name of picture (default: <timestamp>)
% 'destination' : Save location (default: cd)
% 'figure' : Figure handle (default: gcf)
% 'invert' : whether to invert (default: false)
% 'figsave' : whether to also save the figure (default: false)
% 'uidir' : whether to use user-selected directory (default: true)
% 'manualcrop' : whether to manually crop the image (default: true)
% 'hidecontrols': whether to hide ui controls (default: false)
% 'colors' : how to modify colors. Make a cell array to do multiple
% operations. Options are:
% 'inv' : invert colors
% 'grey' : sets colors to greyscale
% 'bw' : black and white
% 'decolor' : greys out the extreme colors.
% 'normal' : does nothing
%
% Enjoy
% -Peter

Citar como

Peter O'Connor (2024). TakeAPicture (https://www.mathworks.com/matlabcentral/fileexchange/31091-takeapicture), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2010b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Printing and Saving en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0