Export eps from MATLAB

I am trying to create high quality EPS files (1000 dpi) for Elsevier magazine. I am using export_fig, but when I try to view the files, they get compressed and distorted. Does anyone know to create an eps that looks just like the number on the screen?

+3


source to share


3 answers


When I exported numbers to eps I had great success using Oliver Woodford's export_fig found in mathworks file exchange.



He has updated it since using it, but it has probably only gotten better.

+2


source


I have a series of steps that I will follow my posts that have not let me down so far. I am including any steps that may be more than what you are asking for. Here

1.Plot with correct line width and / or marker size

Font size 2.Set

3. Set X and Y lims

4. Set X and Y ticks

5. Set X and Y labels as appropriate



6. Set up X and Y axis labels

7.Set Shape Units to Inches

8. Set the size of the shape

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 -painters

ending is important because sometimes dashed and dotted lines are not exported correctly. The same method works with -pdf as well.

+1


source


You can use hgexport.

x = 0:.1:pi;
h = figure();
plot(x, sin(x));
hgexport(h, 'sin.eps');

      

UPDATE
print and save also work.

+1


source







All Articles