Created
March 26, 2019 14:54
-
-
Save Peng-YM/05426f2af857197844778eae76e4a609 to your computer and use it in GitHub Desktop.
Export Matlab figure to PDF without margin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| h = figure; | |
| plot(1:10); | |
| set(h,'Units','Inches'); | |
| pos = get(h,'Position'); | |
| set(h,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)]) | |
| print(h,'filename','-dpdf','-r0') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks.