2

The following code is the minimal version I managed to create. With my Mathematica 11.0.1.0 on Ubuntu 14.04 I find with the code that there is some background for the Inset graphics that can not be made transparent. Is there a way to do this?

Show[
  Plot[x, {x, 0, 1}], 
  Graphics[
    Inset[
      Graphics[{Green, Disk[]}, Background -> None],
      {0.5, 0.5},
      {0, 0},
      0.2,
      Background -> None
    ],
    Background -> None
  ],
  Background -> None
]

In this specific case it is about removing the white space between the plotted line and the circle.

If I export the graphics as a pdf I get the following result with a gray background that I don't want. In Mathematica itself it manifests itself as a whitespace.

enter image description here

Edit: Happens with the Stylesheet StandardReport and not with a style-less notebook.

Maikel
  • 185
  • 1
  • 6

1 Answers1

2

You've got background from the stylesheet. Please try to remove it by using BaseStyle directive:

  g = Show[Plot[x, {x, 0, 1}], 
      Graphics[
          Inset[
            Graphics[{Green, Disk[]}, Background -> None], 
            {0.5, 0.5}, {0, 0}, 0.2, Background -> None, 
            BaseStyle -> {Background -> None}], 
   Background -> None], Background -> None]
Oleg Soloviev
  • 407
  • 2
  • 8