フィルターのクリア

PaperSize problem when printing EPS

5 ビュー (過去 30 日間)
Jose Aguilar
Jose Aguilar 2016 年 10 月 24 日
編集済み: Gowtham Uma M Jaganathan 2016 年 10 月 27 日
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 日
編集済み: 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 Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by