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?

답변 (1개)

Chad Greene
Chad Greene 2014년 8월 13일

0 개 추천

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

Chad Greene
Chad Greene 2014년 8월 16일
This is such a common issue I made a function out of it. Just type rend to toggle renderers.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

질문:

2014년 8월 13일

댓글:

2014년 8월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by