I am trying to produce high quality EPS files (1000 dpi) for an Elsevier journal. I have been using export_fig, but when I try to view the files, they are squished and distorted. Does anyone know to produce an eps that looks the same as the figure on the screen?
-
there was already some discussion on this [here](http://stackoverflow.com/questions/13788168/matlab-export-plot-to-vector-format), you might find some of it useful – Gunther Struyf Jan 21 '13 at 21:49
-
yeah, I am using export_fig, it seems that the problem is the painters renderer. I want to use it to keep my lines looking nice, butit changes the font size. Does anyone know a way around this? – Brian Jan 22 '13 at 00:24
3 Answers
When I was exporting eps figures I had a lot of success using Oliver Woodford's function export_fig found on mathworks file exchange.
He has updated it since I used it, but it's probably only gotten better.

- 189
- 1
- 10
I have a set of steps that I follow for my publications that has never failed me so far. I am including all the steps which might be more that what you are asking for. Here it is
1.Plot with the correct linewidth and/or marker size
2.Set font size
3.Set X and Y lims
4.Set X and Y ticks
5.Set X and Y tick labels if appropriate
6.Set X and Y axis labels
7.Set units of the figure to inches
8.Set the size of the figure
9.Export using export_fig with the -painters option
hf = figure();
plot(x,y,'Linewidth',1);
set(gca,'FontSize',8);
xlim([a,b]);
ylim([c,d]);
set(gca,'XTick',a:ab:b);
set(gca,'YTick',c:cd:d);
xlabel('Xlabel');
ylabel('Ylabel');
set(gcf,'units','inches');
set(gcf,'Position',[0 0 fig_width fig_height]);
export_fig(filename,'-transparent','-eps','-painters');
The final -painters
is important since sometimes dashed and dot-dash linstyles don't get exported correctly. The same method works with -pdf too.

- 1,867
- 1
- 16
- 23
You can use hgexport.
x = 0:.1:pi;
h = figure();
plot(x, sin(x));
hgexport(h, 'sin.eps');
UPDATE
print and saveas also work.

- 103
- 5