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!