correct figure size using print eps R2012a
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Printing and Saving dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!