5
$\begingroup$

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)

$\endgroup$
2
  • $\begingroup$ Still a problem in V13.1. Did you happen to report this? It seems a bug to me. $\endgroup$
    – Michael E2
    Commented Sep 3, 2022 at 20:26
  • $\begingroup$ @MichaelE2 Looking through my old emails, I think I did not report it. $\endgroup$
    – Chris K
    Commented Sep 3, 2022 at 20:42

1 Answer 1

4
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.