image thumbnail


version (2.72 KB) by Laurent S
Save a figure as a clean pdf file ready for publication.


Updated 07 Jul 2011

View License

Like Matlab's saveas.m, but better:

- Print figures as pdf in their correct dimensions (and not on A4 paper like Matlab does).
- If you prefer, you can specify the size of the printed pdf, independent of its size on screen.
- Optionally increase line thickness and font size for better readability.
- Optionally set figure background color to transparent for use in presentations.


figure('Name','A sine');
saveaspdf; % Saves 'A sine.pdf' on your Desktop

Cite As

Laurent S (2021). saveaspdf (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!