tightfig(hfig)
Remove excess margins from figures.
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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 .
Acknowledgements
Inspired by: Get rid of the white margin in saveas output
Inspired: ExportPngInkscape(filename,dpi,handle), tightfig, Average Temperature, JacobD10/tightfigadv, subtightplot, Spreadfigures
General Information
- Version 1.7.0 (3.06 KB)
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! |
||
| 1.6.0 | Now works better with newer Matlab plotting code (i.e. colorbars and legends now handled properly in newer Matlab) |
||
| 1.5.0 | Added suggested improvement for minimum bound by Ben |
||
| 1.3.0 | Corrected bug noted by commenter Thomas, also tidied up some other parts of code and comments. |
||
| 1.0.0 |