Azzera filtri
Azzera filtri

PaperSize problem when printing EPS

5 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

Gowtham Uma M Jaganathan
Gowtham Uma M Jaganathan il 27 Ott 2016
Modificato: Gowtham Uma M Jaganathan il 27 Ott 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

Più risposte (0)

Categorie

Scopri di più su Environment and Settings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by