Remove the background color

How do I remove the background color from the drawn graphic? When I insert the Mathematica-derived plot image (.emf) into the Word, I always find a white background color. How do you make these background colors transparent?

• I tried "Background→None" but it failed. – King.Max Jul 20 at 2:30
• Did you put Background -> None in the Graphic itself, or in the export statement? I'm on macOS, so I can't use the .emf format, but I do get a transparent background with a PNG if I add the Background -> None to the actual export statement. Adding it to the graphic itself resulted in a white background. – MassDefect Jul 20 at 2:50
• How are you exporting the graphic? – Carl Woll Jul 20 at 3:40
• @MassDefect I just tried it, .png *can, but *.emf still has a white background – King.Max Jul 20 at 4:40
• So if png works as expected, why not simply use this format. As far as I know, emf is a buggy format (at least it is not on the same level of maturity as other vector formats, e.g. pdf, eps,svg). – yarchik Jul 20 at 8:57

It is as simple as that for PNG files:

p = Plot[Sin[x], {x, 0, 1}];
Export["~/tmp/bgissue.png", p, Background -> None]


It works the same way for PDF. When I import the exported PDF graphics into Inkscape and put a colored background behind the object, one can clearly see this

If it indeed doesn't work for EMF (which I cannot try on Linux), one choice might be to use PDF.

• I will give it a try, thank you – King.Max Jul 20 at 11:45
• However, the pdf file does not seem to be inserted into the word, and the png file is not in vector format and will be distorted when zoomed in. – King.Max Jul 20 at 12:40
• @King.Max Long live Microsoft Word. Can't you convert the PDF into an EMF somehow? – halirutan Jul 20 at 15:43