Save figure to file, choose the dimensions and crop figure

Save figure to file. Choose the dimensions and crop figure (remove homogeneous edges).
1,6K Descargas
Actualizado 15 jul 2014

Ver licencia

USAGE
fig_print(fig,figname)
fig_print(fig,figname,dim)
fig_print(fig,figname,dim,crop)
fig_print(fig,figname,dim,crop,magn_factor, bg_color)

INPUT
- FIG: figure handle
- FIGNAME: file name, including extension (BMP, JPG, PNG or TIF)
- DIM: 1x2 numeric array with the image dimensions. If DIM=[], the current figure size times MAGN_FACTOR will be used.
- CROP: 1 (crop image) or 0 (do not crop [default]). Remove homogeneous edges
- MAGN_FACTOR: magnification factor (any positive number). Only effective when DIM=[]. Default: 1
- BG_COLOR : If specified, the figure window background color will be changed. You can specify a color using a three-element vector of RGB values or one of the MATLAB predefined names (short name: 'y', 'm', 'c', 'r', 'g', 'b', 'w', 'k')

OUTPUT
- FIGNAME in the current folder or in the folder specified by its path. The file format depends on the given extension.

Citar como

Guilherme Coco Beltramini (2024). Save figure to file, choose the dimensions and crop figure (https://www.mathworks.com/matlabcentral/fileexchange/42035-save-figure-to-file-choose-the-dimensions-and-crop-figure), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2010a
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.
Etiquetas Añadir etiquetas

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.2.0.0

Added the option to change the figure background color

1.1.0.0

Added screenshot

1.0.0.0