In some pdf viewers such as Preview on OSX, plots made with matplotlib's pcolor have white lines (see image below). How can I get rid of them? The source code is very simple (choose any data for x,y,z): import matplotlib matplotlib.use("pdf") import matplotlib.pyplot as pl pl.figure() pl.pcolormesh(x,y,z,cmap="Blues",linewidth=0) pl.savefig("heatmap.pdf") Continue reading...