When we use Background-> None
in plot options, and export the plot for example as a PNG
format, but we have a plot with a white background when we insert in a software as Powerpoint. How can we export a plot without any background?
3 Answers
$\begingroup$
$\endgroup$
Use the option Background->None
in your Export
call:
file = Export["tst1.png", Graphics[Circle[]], "PNG", Background->None];
Style[Import[file], Background->LightBlue]
$\begingroup$
$\endgroup$
1
myfig = RemoveBackground[Graphics[Plot[Sin[x], {x, 0, 10}]]];
Export["/.../myfig.png", myfig, "PNG"]
-
$\begingroup$ FWIW: this works with Mathematica 11.0 on a Mac running Mojave. @b3m2a1 's answer, unfortunately, still produces a white background. $\endgroup$ Commented Oct 22, 2019 at 16:01
$\begingroup$
$\endgroup$
2
Here's the way I tend to do it:
Export[
"path/to/file/asd.png",
Rasterize[
Plot[Sin[x], {x, 0, 10},
Background -> None
],
Background -> None
]
]
-
1
-
$\begingroup$ @Irreversible If it can't that's news to me. It works on my Mac. $\endgroup$– b3m2a1Commented Feb 6, 2018 at 20:59