PaperSize problem when printing EPS

5 Ansichten (letzte 30 Tage)
Jose Aguilar
Jose Aguilar am 24 Okt. 2016
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?

Akzeptierte Antwort

Gowtham Uma M Jaganathan
Gowtham Uma M Jaganathan am 27 Okt. 2016
Bearbeitet: Gowtham Uma M Jaganathan am 27 Okt. 2016
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

Weitere Antworten (0)

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by