MATLAB: Does printing the same figure as EPS and PDF produce files with different aspect ratios

boundingboxenhancedlooseMATLABpostpostscriptpsratioscript

When I print the same figure as EPS and PDF produce files, I obtain different aspect ratios.

Best Answer

Printing the same figure as EPS and PDF in MATLAB 7.5 (R2007b) might result in different aspect ratios of the PDF file and the EPS bounding box.
Reproduction steps:
print(gcf, '-depsc2', '-r100', 'file.eps');
print(gcf, '-dpdf', '-r100', 'file.pdf');
To work around this issue, use the 'loose' parameter when printing the EPS file, as follows:
print(gcf, '-depsc2', '-r100', '-loose', 'file.eps');