I am trying to output a simple plot with a legend and the output keeps coming out with a gray background. A simple example is the following:
Plot[{Sin[x], Cos[x]}, {x, 0, 2*3.14}, PlotStyle -> {Red, Blue},
PlotLegends -> SwatchLegend[{Red, Blue}, {"sin(x)", "cos(x)"}]]
Export["trig.pdf", %]
which outputs (notice the gray background!),
$\hspace{1cm}$
I have tried setting "Background->White" in different places, but only managed to have certain regions to get a white background. How can I get an export the image with a white background (and keeping it in pdf format)?
I am using Mathematica V9 on Linux.
Edit:
- I just upgraded to V10 with hopes that it would fix the issue and the problem still persists.
- pdf and eps both show the gray background while image formats such as jpg don't. Oddly enough svg also doesn't show the gray background.
- I'm using Ubuntu 14.04 with Intel 4th generation graphics card.
- I tried using different pdf viewers and they all showed the same gray background.