TakeAPicture

Take a snapshot of the current figure, save it as a png (or tiff or whatever) image
449 téléchargements
Mise à jour 18 avr. 2011

Afficher la licence

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

Citation pour cette source

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

Compatibilité avec les versions de MATLAB
Créé avec R2010b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Printing and Saving dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0