I have recently upgraded to R2014b (Linux version), and now exporting figures to eps seems to have a strange bug. If I try the following from the command line, I get the expected outcome. plot(1:3,2:4);print(gcf,'-depsc', 'testFromCommandLine.eps');
However, if I run the exact same script from the editor window, I get an eps file with a graph that occupies the top left corner of the canvas.
The only code in the script is: close all; plot(1:3,2:4); print(gcf,'-depsc', 'testFromScript.eps')
The screenshots of the two generated eps files are embedded.
This happens in all these three cases: pressing the RUN button in the editor, selecting the code and running the selection and executing the script (just typing the script's name without .m) from the command line.