Here is a simple way to expose the the problem, at least on the version of matlab I'm using.
1) Create a simple figure and embellish it a little, e.g. like this.
x=linspace(-0.8,0.8,101);y=x.^2;
plot(x,y);
xlabel('$x$','interpreter','latex','fontsize',18);
ylabel('$x^2$','interpreter','latex','fontsize',18);
set(gca,'fontsize',14); % increase font size
You should see the plot of a parabola. The axis ticks
are -1, -0.5, 0 , 0.5, 1 on the x axis and
0, 0.1, 0.2, ..., 0.7 on the y axis.
2) Export this figure as "menusaveas.eps" file via the "save as" item on the "file" menu of the figure window.
3) Export this figure using the builtin function, as suggested
by Tim (I changed the device to eps2c, type2 color eps).
saveas(gcf,'functionsaveas.eps','eps2c');
4) Compare the output files opening them e.g. via ghostview.
You should notice that the menusaveas.eps figure is basically
wysiwyg, whereas functionsaveas.eps is not. The bounding box
is different and, at least in my case, the xticks are different. If included in a tex-generated file, the fonts in the functionsaveas.eps figure will be smaller.
I am wondering what is matlab really doing the "menusaveas"
case. There should be some additional option to make the exported figure more wysiwyg, but so far I was not able to put my finger on it.
As I say, I have looked into saveas, and it seems to me that in this case it boils down to the command
print(gcf,'-dpsc2','functionsaveas.eps');
I also had a look in the package suggested by "the cyclist", and I am afraid that the eps is printed in the same way.
In that case a the eps is further "embellished" by some other functions. While I think that the package looks great, it seems to me that there should be a much easier way to reproduce the behaviour of the "save as" menu item from the command line.
Thanks a lot for any further comments
F