I've had this issue for quite awhile - and it's quite frustrating. When publishing papers, we try to get all of our figures in .pdf for obvious reasons. Usually, Mathematica exports to .pdf just fine, except when you have plots in a Row[]. For example:

Plot[Sin[x], {x, 0, 2 \[Pi]}, Frame -> True, 
        FrameLabel -> {"y", "x"}, ImagePadding -> {{100, 0}, {100, 0}}, 
        BaseStyle -> {FontSize -> 30, FontFamily -> "Times"}, 
        LabelStyle -> Black, ImageSize -> 900],

   Plot[Cos[x], {x, 0, 2 \[Pi]}, Frame -> True, 
    FrameLabel -> {"y", "x"}, ImagePadding -> {{0, 1}, {100, 0}}, 
    BaseStyle -> {FontSize -> 30, FontFamily -> "Times"}, 
    LabelStyle -> Black, ImageSize -> 800]

Export["~/Desktop/test.pdf", testplot]
Export["~/Desktop/test.png", testplot]

Should produce a nice side-by-side plot, where each plot uses the same y-axis. The .png output looks fine:

Test .png output

While the .pdf output messes up and wraps the second plot:

messed up .pdf output

Has anyone seen this issue before? I've tried everything I can think of, but .pdf export just will not export side-by-side images!

Thanks in advance, Zack

  • 2
    $\begingroup$ Does GraphicsRow not work? $\endgroup$ Oct 12, 2018 at 22:15
  • $\begingroup$ When you export to PDF, your image width specify printers points at 72 per inch. If you want to put two figures side by side, set their widths to 216 each. $\endgroup$
    – Alan
    Oct 13, 2018 at 0:44

1 Answer 1


You could use a Style wrapper to prevent line breaks:

Export["pdftest.pdf", Style[testplot, LineBreakWithin->False]];
  • $\begingroup$ Thank you Carl!! $\endgroup$
    – zack
    Oct 13, 2018 at 3:03

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.