How do I create a PDF file of a figure without whitespace around it?
46 次查看(过去 30 天)
显示 更早的评论
When I print or save a figure to a PDF-file, the resulting file has white space around the figure.
For example, execute the following commands
plot(1:10)
print -depsc test_print1
and then open file test_print1.eps
采纳的回答
MathWorks Support Team
2010-5-3
Go to File->Export Setup and check the 'Expand axes to fill figure' check box and then click "Apply to Figure"
Then use the following commands:
set(gcf, 'PaperUnits', 'normalized')
set(gcf, 'PaperPosition', [0 0 1 1])
print -depsc test_print
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!