When I export a Plot in Mathematica as a PDF characters in PlotLegends and AxesLabels get replaced by other characters.

My code:

plot = Plot[x, {x, 0, 1}, PlotLegends -> {"T = 1"}, AxesLabel -> {"p / GeV", "M in GeV^-1 "}]

Export["/home/test.pdf", plot, "PDF"]

Export["/home/test2.png", plot, "PNG"]

This code gives me wrong characters in the pdf file, and right ones in the png file (the "=", "-", "/" are wrong). The Plot when I export it as a pdf. Note: I can not place pdf here, so I used an online pdf to png converter here

The Plot when I export it as a png.

VersionNumber: 13.1 on Linux

  • 2
    $\begingroup$ hint: whenever you report a problem always indicate the version number and the OS you are using. I just tried the above on V 13.2 on windows 10. No problems at all. $\endgroup$
    – Nasser
    Jan 30, 2023 at 14:22
  • $\begingroup$ Tested in 13.1.0 for Microsoft Windows (64-bit) (June 16, 2022) Wolfram Engine, and I see no problems here. $\endgroup$
    – rhermans
    Jan 30, 2023 at 15:55
  • $\begingroup$ Could you try specifying the fonts explicitly? Look at 23471. $\endgroup$
    – rhermans
    Jan 30, 2023 at 16:42
  • $\begingroup$ Please read the guidelines for the bugs tag. $\endgroup$
    – Michael E2
    Jan 30, 2023 at 22:05


Your Answer

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

Browse other questions tagged or ask your own question.