PaperSize problem when printing EPS

5 次查看(过去 30 天)
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?

采纳的回答

Gowtham Uma M Jaganathan
编辑:Gowtham Uma M Jaganathan 2016-10-27
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by