correct figure size using print eps R2012a
1 回表示 (過去 30 日間)
古いコメントを表示
Hi All,
I have done a search and can't find the solution to a pretty simple problem. I want to save figures using the print function, but the dimensions of the figure gets funky when I try to save in eps. I need to use eps for publishing.
Here is an example of a simple data set with the code I use to print the figure
x=[0:50];
y=sin(x);
yE=rand(1,51)/10;
close all
figure(1)
axes('FontSize',10)
errorbar(x,y,yE,'-o','markerfacecolor','b')
xlabel('x','FontSize',12)
ylabel('y','FontSize',12)
set(gcf,'Units','inches','PaperUnits','inches')
set(gcf,'PaperPositionMode','auto')
set(gcf,'Position',[0 0 4.5 3.39])
print(gcf,'-depsc','test.eps')
here is the figure if I use file- save as in the figure:

Here is the image saved using the print(gcf,...) command:

Both figures above were was saved as .eps but had to convert to .jpg to upload here. Also, to highlight the change in figure size I added a black box around the edge of the image.
adding '-loose' did not fix the problem for me. I am using linux (scientific linux 6.7)
Thanks,
Casey
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Printing and Saving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!