Blank white lines in eps exported surf plots.

I exported a surf plot in eps format using the below code.
s = figure(10);
surfc(double(smooth_img));
saveas(figure(10), 'surf.eps','epsc2');
I'm not able to remove the blank white lines in the image (i.e. at y = 250 and x = 100). Does anybody have any solution?

Answers (1)

Whenever weird things happen in figures, my first line of defense is trying different renderers. Try all three:
set(gcf,'renderer','painters')
saveas(figure(10), 'surf.eps','epsc2');
Did that work? If no, try this:
set(gcf,'renderer','opengl')
saveas(figure(10), 'surf.eps','epsc2');
Still didn't work? Try this:
set(gcf,'renderer','zbuffer')
saveas(figure(10), 'surf.eps','epsc2');
Also, I have never seen saveas outperform export_fig. Getting ghostscript working with export_fig is a ~5 minute headache that will result in years of nicer graphics.

1 Comment

This is such a common issue I made a function out of it. Just type rend to toggle renderers.

Sign in to comment.

Categories

Find more on Printing and Saving in Help Center and File Exchange

Asked:

on 13 Aug 2014

Commented:

on 16 Aug 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!