Effacer les filtres
Effacer les filtres

Vertical white line artefacts on exported figures [R2017a]

7 vues (au cours des 30 derniers jours)
Cyril GADAL
Cyril GADAL le 17 Nov 2017
I'm trying to export figures to vector format files (eps, pdf, svg) from matlab, and the rendering is pretty bad. I found that when using dashed or dotted lines, eps and pdf format gives a very bad rendering where svg gives the right one.
However, when I try to export a figure from contourf/imagesc/surf, I have white lines that appears only on the exported figures. (Matlab rendering is ok).
How do I fix that ? I tried to change the rendering with
set(gcf,'renderer','painters')
from this topic https://fr.mathworks.com/matlabcentral/answers/99614-why-do-i-get-white-line-artifacts-in-my-image-when-rotating-a-3-d-surf-plot-in-matlab-7-1-r14sp3p3 , but the print/saveas command keep matlab busy for hours, so I have to close everything manually.
here is the code used to print this figure :
figure
[C2,h2] = contourf(X',Y',Z2,50) ;
h2.LineStyle = 'none' ;
colormap(gray)
hold on
plot(k(Indmax),alpha,'k-','Linewidth',2)
hold on
plot(k(Indsep),alpha,'k--','Linewidth',2)
ax = gca ;
set(gca,'FontSize',14)
c = colorbar ;
c.Label.String = '$\sigma$' ;
c.Label.Interpreter = 'latex' ;
c.FontSize = 14;
c.Label.FontSize = 18 ;
c.Location = 'northoutside' ;
ylabel('\alpha (°)','FontSize', 18)
xlabel('$k$','Interpreter','latex', 'FontSize',18)
yticks([-90 -45 0 45 90])
set(h2,'edgecolor','none')
% shading(gca,'flat')
% set(gcf,'renderer','painters')
saveas(gca,'Sigma_3D_r1.6','svg')
% print('-dsvg','-painters', 'Sigma_3D_r1.6')

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by