When exporting a RegionPlot
to PDF, spikes appear on the boundary:
plot = RegionPlot[-x < y < x, {x, 0, 2}, {y, -2, 2}];
Export["plot.PDF", plot]
I am not concerned with the lines in the interior of the region, which has its own question (2629). However I do note that every spike (except the two spikes at the origin) is located at the intersection of multiple interior lines with the boundary.
Exporting Style[plot, Antialiasing -> False]
removes some but not all of the spikes, although on closer inspection it appears that some of the spikes haven't been removed, but rather a change in orientation has caused them to be hidden or more covered under the boundary. Jens' replacement has no effect on the spikes (nor the interior lines, but again the issue isn't the lines).
Export["plotAF.PDF", Style[plot, Antialiasing -> False]]
(* fewer spikes / rotated so they are less apparent *)
Export["plotJens.PDF", plot /. {EdgeForm[], r_?ColorQ, i___} :> {EdgeForm[r], r, i}]
(* no change *)
(Using Version 10.2.0 for Microsoft Windows (32-bit))
BoundaryStyle->None
and add the lines manually again (Epilog or Show[Graphics[Line[....). $\endgroup$ – Julien Kluge Jul 19 '17 at 20:37