MATLAB: Print a figure into PDF

pdf

Hi,
I want to print a matlab .fig into .pdf, but only the center part of the figure is shown on the .pdf file. Do you know how to solve this?
Thanks!

Best Answer

I guess, that you have a fixed PaperPosition, which is outside the visible range. Try this:
figure('PaperPositionMode', 'auto');
plot(rand(10));
print(gcf, '-dpdf', 'test.pdf');
You can set the PaperPosition in the Print-GUI also.