I want to use PDF versions of my matlab plots in the latex document. I am saving data using the "service" command with PDF option, but I get huge white space around my plots in PDF files. Is this normal? How can i get rid of this? Automatically, definitely, because I have "lots of" plots I
A good initial The point is. Instead of using -deps
for PDF output -dpdf
you can correct the bounding box problem by using the following code
set (gcf, 'paper size', [6.25 7.5]); Set (gcf, 'paperposition mode', 'manual'); Set (GCF, 'Paperpection', [0 6.25 7.5]); Set (gcf, 'papernansi', 'inch'); Set (gcf, 'paper size', [6.25 7.5]); Set (gcf, 'paperposition mode', 'manual'); Set (GCF, 'Paperpection', [0 6.25 7.5]); Set (gcf, 'renderer', 'painters'); Print (gcf, '-dpdf', 'my-figure.pdf'); Print (gcf, '-dpng', 'my-figure.png'); Print (gcf, '-depsc2', 'my-figure.eps');
You can read more about the article about this.
Comments
Post a Comment