Bug introduced in 10 or earlier and persisting through 11.1.1
There is no bug in version 8.0.4 on Windows

I think I've stumbled upon a bug in Mathematica v10.0.0 on linux. Rotate does not seem to play well with export. If I run:

Show[Plot[x, {x, 0, 1}], Graphics[{Rotate[Text["test"], \[Pi]/4]}]]
Export["~/tmp.pdf", %]

then Mathematica consistently crashes. If I remove Rotate then this no longer crashes. Furthermore, if I remove Export then everything seems to work as desired.

  • $\begingroup$ Works OK in MM 10.2 OSX 10.10.4. $\endgroup$
    – bill s
    Jul 19 '15 at 13:47
  • 1
    $\begingroup$ You should really upgrade to at least the latest bugfix release, which is 10.0.2 for 10.0. Especially if you run into bugs ... It doesn't crash in 10.0.2. That said, the export result is wrong in all versions between 10.0.2 -- 10.2.0. In 9.0.1 it's correct. $\endgroup$
    – Szabolcs
    Jul 19 '15 at 14:14
  • 1
    $\begingroup$ For your information: Policy is that the "bugs" tag is only used if the assumed bug had been confirmed by the community. The tag wiki says so much. In this case, given alexey's confirmation we can leave it this way, but please follow the tag wiki guidelines next time. $\endgroup$ Jul 19 '15 at 15:17
  • $\begingroup$ The bug isn't present in versions 11.3 and 12.0. $\endgroup$ Aug 22 '19 at 8:32

No crash with versions 10.2, 10.4.1 and 11.1.1 on Win7 x64 but there definitely is a bug.

Here is how the graph is displayed in the FrontEnd:

Show[Plot[x, {x, 0, 1}], Graphics[{Rotate[Text[Style["test", 60], {.5, .5}], \[Pi]/4]}]]


And here is how the Exported PDF is rendered by Acrobat 11 (other PDF viewers show the same):

Export["1.pdf", %] // SystemOpen


(checked with versions 10.2, 10.4.1 and 11.1.1 on Win7 x64).

The file exported with the above code from Mathematica 8.0.4 is rendered exactly as it looks in the FrontEnd of this version:



  • $\begingroup$ Same bug no matter whether the exported PDF is viewed with Preview or Adobe Acrobat Reader under Mac OS X. $\endgroup$
    – murray
    Jul 19 '15 at 21:52

I've found a workaround by specifying a "direction vector" through the Text function instead of through Rotate:

Show[Plot[x, {x, 0, 1}], 
    Graphics[{Text["test", {0.5, 0.5}, Automatic, {1, 0.5}]}]]
   Export["~/tmp.pdf", %]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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