How can I avoid cropped pdfs?

1 view (last 30 days)
Dave Benson
Dave Benson on 10 Feb 2015
Edited: Dave Benson on 10 Feb 2015
I'm trying to export a large figure as a .pdf. In the pdf output, the figure is always cropped. The original figure contained 5 columns of plots; the output crops half of these and only produces two and a half columns.
Does anyone know why this is happening, and how I can export the entire figure to pdf?
I'm using this command:
print(gcf, '-dpdf','cropped.pdf');
Sadly I've been unable to come up with a succinct code listing that reproduces the problem. The lines below are similar to my actual code, but these work fine. The operation only seems to fail on my actual code, which is too lengthy to post here.
figure;
for i = 1:40
subplot(8,5,i);
plot(1:96000,rand(96000,1));
title('xxxxxxxxxxxxxxxxxxxxxxxxxxxx')
end
print(gcf, '-dpdf','cropped.pdf');

Answers (0)

Categories

Find more on Printing and Saving in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!