# Avoid bold font Exported graphics? (MMA 11.3 on macOS)

Posted 5 months ago
1436 Views
|
8 Replies
|
3 Total Likes
|
 I've been trying to make publication quality graphics and ran into this problem. Here's some test code I ran in Mathematica 11.3.0.0, on macOS 10.14.1 (18B75). fig = Plot[Sin[x*(Pi)], {x, 0, 2}, Frame -> True, Axes -> False, FrameLabel -> {"\!$$\* StyleBox[\"x\",\nFontSlant->\"Italic\"]$$/\[Pi]", "sin(\!$$\* StyleBox[\"x\",\nFontSlant->\"Italic\"]$$)"}, LabelStyle -> {Black, Thin}, ImageSize -> 200] Export[NotebookDirectory[] <> "testFig.pdf", fig]; The output file looks like this (screenshot of the pdf). whilst in the notebook it looks like this (screenshot) I run the same code in my Windows 8.1 partition, running Mathematica 11.3 and the exported graphic looks like I expect it to. Any ideas why this happens/ if there's a solution?P.S. I've checked that png outputs give the same result - they do. I've also played around with the LabelStyle options and had no luck.
8 Replies
Sort By:
Posted 5 months ago
 Michael,This is a bug -- for what its worth, it is fixed in V12. As for workarounds, these all seem to work: Export["testFig.png", fig, ImageResolution -> 600] Export["testFig.tiff", fig, ImageResolution -> 600]; Export["testFig.jpg", fig, ImageResolution -> 600]; Regards,Neil
Posted 5 months ago
 Thanks Neil.Do you know of any workaround that works for a pdf output? Ideally I'd like to export vector graphics.Mike
Posted 5 months ago
 We can print to pdf with File > Print selection as, which is not affected by the bug. On the other hand, we get the picture inside a whole pdf page, and we will probaby have to crop it.
Posted 5 months ago
 That sort of works but in ListPlot I end up with some of the points coming out of the frame. I'm happy enough to just switch OS to get these graphics...
Posted 5 months ago
 Mike,One suggestion would be to use a PDF Editor to change the fonts after the file is generated. However, I have found that PDF output is not always the best option for publication quality. If you have many points in your plot and multiple plots, the PDF becomes problematic and causes other programs (i.e. Word, Powerpoint) to crawl to a stop. I had my best results using png files at high resolution (usually 300 but 600 or more if you really want super high res). The programs that use the graphics are much happier with rasterized files. I do all my reports this way because PDF files in the past caused me many problems.RegardsNeil
Posted 5 months ago
 As an example do this: Export["testFig2.pdf", ListLinePlot[ RandomReal[1, 10000]]] Insert several of these into word -- each one takes over 10 seconds to import. Now scroll the page and try to move around -- the response is terrible.Now do this: Export["testFigRas.png", ListLinePlot[ RandomReal[1, 10000]], ImageResolution -> 600] Insert this file multiple times into Word and the insert is instantaneous and the responsiveness of Word is unaffected.Regards,Neil