Hi, I am having the following problem:
When I create a contourf plot and remove the lines between levels, as I try to print as .eps or .pdf, I end up with many unwanted white lines separating the levels. This does not happen when I print a .png or the number of levels is small.
I have reproduced the problem with the example for contourf given in Matlab website (https://www.mathworks.com/help/matlab/ref/contour.html), see code below.
The choice of colormap does not affect the result. However, I need to use colormap('grey'), and in that case the problem is even more obvious.
clc, close all, clear all
Z = peaks;