# ContourPlot has extra mesh in PDF

When I create a contour plot it looks fine. When I copy as PDF, and paste into another document (e.g. Apple Mail, Keynote, etc.) it has an extra unwanted white mesh. This occurs even when the option Method -> {"TransparentPolygonMesh" -> True} is used.

Here is an example.

plot = ContourPlot[Exp[-Norm[{x, y}]^2], {x, -1, 1}, {y, -1, 1},
Method -> {"TransparentPolygonMesh" -> True}]


Here is the picture that results, after copying as PDF, pasting into Mail, and doing a screen grab.

Here are the options:

Options[plot]

{DisplayFunction -> Identity,
AspectRatio -> 1, DisplayFunction :> Identity, Frame -> True,
FrameTicks -> {{Automatic, Automatic}, {Automatic, Automatic}},
GridLinesStyle -> Directive[
GrayLevel[0.5, 0.4]],
Method -> {"TransparentPolygonMesh" -> True,
"DefaultBoundaryStyle" -> Automatic},
PlotRange -> {{-1, 1}, {-1, 1}}, PlotRangeClipping -> True,
PlotRangePadding -> {{Scaled[0.02], Scaled[0.02]}, {Scaled[0.02],
Scaled[0.02]}}, Ticks -> {Automatic, Automatic}}


I am using version 11.0.0.0 on Apple OS X 10.11.6 but the problem was present in previous versions.

I am aware that similar questions have been asked, but none provided a solution.

• For what it's worth, if I right-click the graphic, select "Save graphic as...", and save as a PDF in Windows, then the PDF is clean, with no underlying mesh. This is true even without setting the TransparentPolygonMesh method explicitly. the output of my Options function is identical to yours. – Pirx Aug 18 '16 at 0:02
• I should have added: The resulting PDF looks clean in Adobe Acrobat. I just opened it in my GhostScript viewer, and it shows a somewhat uglier version of the mesh you show in your post. I then opened the PDF in PDF-XChange viewer, and that again gave a clean image, and so did Photoshop. My guess is what you are seeing is an artifact of your OS X PDF viewer. – Pirx Aug 18 '16 at 0:06
• Try the cleanContourPlot function from here. It doesn't work on everything but it works well on your example. – Szabolcs Aug 18 '16 at 9:24
• Possible duplicate of Saner alternative to ContourPlot fill – Henrik Schumacher Jun 17 '18 at 10:49