tightfig(hfig)

Remove excess margins from figures.

Download
Download

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Cite As

Richard Crozier (2026). tightfig(hfig) (https://au.mathworks.com/matlabcentral/fileexchange/34055-tightfig-hfig), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.7.0

Actually uploaded new file this time!

Download
1.6.0

Now works better with newer Matlab plotting code (i.e. colorbars and legends now handled properly in newer Matlab)

Download
1.5.0

Added suggested improvement for minimum bound by Ben

Download
1.3.0

Corrected bug noted by commenter Thomas, also tidied up some other parts of code and comments.

Download
1.0.0

Download