I've found a simple example that illustrates my problem:

ContourPlot[x^2 - 1 == y, {x, -1, 1}, {y, -1, 1}, PlotLegends -> "Expressions"]

When I try to export this to PDF, I get the following:

Contour plot with legend and bug

and in the legend, the expression is misspaced and unreadable. Is this a known bug? Is there a known work around?

  • 1
    $\begingroup$ it worked for me. no problems. $\endgroup$
    – Nasser
    Nov 20, 2013 at 20:17
  • 1
    $\begingroup$ What platform/version are you on? Works fine for me on Mac OS X Mathematica version 9.0.1. $\endgroup$
    – cormullion
    Nov 20, 2013 at 20:17
  • $\begingroup$ Linux, mathematica 9.0.1 $\endgroup$ Nov 20, 2013 at 22:30
  • 2
    $\begingroup$ I could reproduce this on Linux, M9.0.1, but not on OS X. You should probably report the problem to support at wolfram.com $\endgroup$
    – Szabolcs
    Nov 21, 2013 at 1:05
  • 1
    $\begingroup$ When I try OP's code, I get no legend at all. I can only get a legend if I am plotting more than one curve. For example, ContourPlot[{x^2 - 1 == y}, {x, -1, 1}, {y, -1, 1}, PlotLegends -> "Expressions"] gives no legend, but ContourPlot[{x^2 - 1 == y, -x^2 + 1 == y}, {x, -1, 1}, {y, -1, 1}, PlotLegends -> "Expressions"] does give a legend. Was this a change from version 9? I'm using version 10.2 $\endgroup$
    – Jason B.
    Oct 28, 2015 at 13:32

1 Answer 1


Funnily enough, when I tried this in version 10 (10.1 and the recently released 10.3), the legend didn't show at all. But in version 9 it does, and I assume that is what you were using given the timing of your question and the format of the graphic you posted.

I have not been able to replicate your problem in either Windows or Mac versions of Mathematica 9.0x. But I suspect that the issue was related to font embedding and substitution. Try the following code to remove the Mathematica custom fonts from the PDF, and use the normal text font for minus and equals signs.

 PrivateFontOptions -> {"OperatorSubstitution" -> False}]

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.