MATLAB: PaperSize problem when printing EPS

print eps papersize

I am using Matlab R2016a Win64 and whenever I print a figure in eps format the 'PaperSize' does not work. The code is as follows:
width = 10;
height = 5;
set(ThePlot,'paperunits','centimeters')
set(ThePlot,'PaperPositionMode','Manual');
set(ThePlot,'PaperSize',[width,height*2])
set(ThePlot,'PaperPosition',[0,0,width,height])
str = strcat('Fig1');
path1 = fullfile('Figures', str);
print(ThePlot,'-depsc',path1)
But when I open the eps file, I see that the paper size is the same as the figure, when I am expecting it to be twice as big. However, when I print to 'pdf' everything seems to work perfectly, is this a bug in Matlab or am I doing something wrong here?

Best Answer

The "PaperSize" property of the figure affects only PDF and PostScript file formats while saving the figure. Hence, when you are trying to save the file in EPS format, the "print" function ignores this property.
This is documented under "PaperSize" figure properties. Refer the link given below: http://www.mathworks.com/help/releases/R2016a/matlab/ref/figure-properties.html#prop_PaperSize