5

Dashed styling gets erroneously applied to the head of an Arrow when exported to PDF in version 12.1-12.2 on Mac -- it looks fine on the screen and when exported to PNG (also fine for versions 10.0-12.0).

testfig = Graphics[{Blue, Dashing[.03], Thickness[0.008], Arrow[{{0, 0}, {0, 1}}]}]
Export[StringJoin["testfig.png"], testfig, "PNG", ImageResolution -> 300];
Export[StringJoin["testfig.pdf"], testfig, "PDF"];

PDF: enter image description here

PNG: enter image description here

Bug? Workaround?

Possibly related (although the fix doesn't work)

Chris K
  • 20,207
  • 3
  • 39
  • 74

1 Answers1

4

This works for me in v12.1.1 on Windows 10:

ah = Graphics[{EdgeForm[Thickness[0]], 
   Triangle[{{-1, .4}, {0, 0}, {-1, -.4}}]}];

testfig2 = Graphics[{Blue, Arrowheads[{{.03, 1, {ah, 1}}}], Dashing[0.03], Thickness[0.01], Arrow[{{0, 0}, {0, 1}}]}]

Export["testfig.pdf", testfig2]

enter image description here

PDF:

enter image description here

I don't understand why just EdgeForm[] doesn't work.

MelaGo
  • 8,586
  • 1
  • 11
  • 24