Bug introduced in 10.4.1 or earlier and persisting through 12.0
Bug isn't present in version 8.0.4
I am trying to export a graphic generated by the following code to a .pdf file.
c := 1;
ctoP = 0.80;
P := c/ctoP;
s0 := 0.0;
sf := 1.5;
\[Theta]0 := Pi/180*45;
theta =
DSolve[{\[Theta]'[s] == Sqrt[
2.0 (c + P Cos[\[Theta][s]])], \[Theta][
0] == \[Theta]0}, \[Theta], s];
elastica =
NDSolve[{x'[s] == Cos[\[Theta][s]], y'[s] == Sin[\[Theta][s]],
x[0] == 0, y[0] == 0} /. theta, {x, y}, {s, s0, sf}];
deformed =
ParametricPlot[{x[s], y[s]} /. elastica, {s, s0, sf},
PlotPoints -> 500, Frame -> False, Axes -> False,
FrameStyle -> Black,
PlotPoints -> 200,
PlotStyle -> {Black,
Thickness[0.003]},
PlotRange -> {{-8, +8}, {-2, 4}},
ImageSize -> Large
]
Export["figure.pdf", deformed, ImageResolution -> 1500]
The file "figure.pdf" obtained has the following unwanted features (highlighted using red ovals) on it:
Interestingly enough, these features do not appear if the file is exported as a .png or .jpeg.
I've also tried exporting the graphic as an .eps file, but the problem still remains.
I need the file in .pdf format because I don't want my figures to be rasterized.
How can I get rid of these artifacts on the pdf and obtain a nice smooth curve?