4
$\begingroup$

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?

$\endgroup$
6
$\begingroup$

Use the option Background->None in your Export call:

file = Export["tst1.png", Graphics[Circle[]], "PNG", Background->None];

Style[Import[file], Background->LightBlue]

enter image description here

$\endgroup$
4
$\begingroup$
myfig = RemoveBackground[Graphics[Plot[Sin[x], {x, 0, 10}]]];

Export["/.../myfig.png", myfig, "PNG"]
$\endgroup$
1
$\begingroup$

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
  ]
 ]
$\endgroup$
  • 1
    $\begingroup$ I think this cannot work!! $\endgroup$ – Unbelievable Feb 6 '18 at 19:02
  • $\begingroup$ @Irreversible If it can't that's news to me. It works on my Mac. $\endgroup$ – b3m2a1 Feb 6 '18 at 20:59

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.