View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Save figure to file, choose the dimensions and crop figure

5.0 | 1 rating Rate this file 13 Downloads (last 30 days) File Size: 4.37 KB File ID: #42035 Version: 1.2
image thumbnail

Save figure to file, choose the dimensions and crop figure



31 May 2013 (Updated )

Save figure to file. Choose the dimensions and crop figure (remove homogeneous edges).

| Watch this File

File Information

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

- 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')

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


Export Fig and Crop Image By Removing Edges With Homogeneous Intensity inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
08 Jan 2015 Mike

Mike (view profile)

very useful. Thanks!

03 Jun 2013 1.1

Added screenshot

15 Jul 2014 1.2

Added the option to change the figure background color

Contact us