# Undesirable grid appears when ParametricPlot is exported as PDF

Writing:

plot = ParametricPlot[{x, Min[1, 2] t}, {x, 0, 2}, {t, 0, 1},
PlotRange -> {{0, 2}, {-1, 2}}]


I get: but if I write:

Export["test.pdf", plot]


I get: How can I get the same image in test.pdf?

• How about this? plot = Plot[1, {x, 0, 2}, PlotRange -> {{0, 2}, {-1, 2}}, Frame -> True, Filling -> Axis, AspectRatio -> 1.5,PlotStyle -> Thin] – OkkesDulgerci Aug 13 '18 at 13:43
• Thanks, the result is the desired one, but I should use the parametric method. :( – TeM Aug 13 '18 at 14:31
• You can try Will Robertson's FixPolygons package for joining the polygons. – Alexey Popkov Aug 13 '18 at 14:40
• – Jens Aug 13 '18 at 14:53
• What's up with Min[1, 2] t? Surely that can be replaced by t alone? Or doesn't the problem reproduce then? – Andreas Rejbrand Aug 13 '18 at 16:46

UPDATE: See more general solution in this answer.

You can solve this problem by joining the polygons using undocumented function GraphicsPolygonUtilsPolygonCombine:

plot = Normal@
ParametricPlot[{x, Min[1, 2] t}, {x, 0, 2}, {t, 0, 1},
PlotRange -> {{0, 2}, {-1, 2}}] /.
p : {__Polygon} :> GraphicsPolygonUtilsPolygonCombine[p];

Export["test.pdf", plot] // SystemOpen


Here is how the file is rendered by Adobe Acrobat: (checked with version 11.1.0).

• Perfect! Thanks! – TeM Aug 13 '18 at 17:34

Another workaround is to remove transparency from the polygons by specifying the PlotStyle explicitly:

plot = ParametricPlot[{x, Min[1, 2] t}, {x, 0, 2}, {t, 0, 1},
PlotRange -> {{0, 2}, {-1, 2}}, Mesh -> None,
PlotStyle -> RGBColor[{0.812, 0.851, 0.914, 1}]] Now the PDF

Export["test.pdf", %] // SystemOpen


is rendered as 