This is how I generate .eps/.pdf/.png files for publications. This will produce nice vector figures and rasters at a nice crispy 300 DPI
Add this to the top of your script
fontname = 'Arial'; % or your favorite font, IEEE prefers Arial in figures. Helvetica is also sexy.
set(0,'DefaultAxesFontName',fontname,'DefaultTextFontName',fontname);
set(0,'DefaultAxesFontSize',8);
set(0,'DefaultLineLineWidth',1.2);
colors = get(0, 'DefaultAxesColorOrder');
When creating a new figure window
fignum = 1;
fig = figure(fignum); clf; hold on; grid on; box on;
fig.Renderer = 'Painters'; % this ensures that your figure will be vector/ps
When you are ready to save
fig.PaperUnits = 'inches';
fig.PaperPosition = [0 0 6 4]; % adjust this to the aspect ratio you want in your publication
figpath = strcat('figure_',num2str(fignum));
print(figpath,'-dpng','-r300') % or change this to 600 (dpi) for crispier figs
print(figpath,'-depsc','-r300') % or change this to 600 (dpi) for crispier figs
Optional: Use ghostscript-based eps2pdf MATLAB function to generate pdf
eps2pdf(strcat(figpath,'.eps'),'/usr/local/bin/gs') % second parameter is path to ghostscript exec
For best results, use the .pdf in LaTeX!