How do I create a PDF file of a figure without whitespace around it?

46 vues (au cours des 30 derniers jours)
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

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 3 Mai 2010
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

Plus de réponses (0)

Catégories

En savoir plus sur Printing and Saving dans Help Center et File Exchange

Produits


Version

R14SP2

Community Treasure Hunt

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

Start Hunting!

Translated by