# Why does a Graphics combination with Insets persist to be larger than the actual graphics?

fadingPrimitive[size_, formula_, c_] :=
DensityPlot[
Max[0, formula],
{x, -size, size}, {y, -size, size},
ColorFunction -> (Opacity[#, c] &),
Frame -> False];

fadingPrimitive[r, r - Sqrt[x^2 + y^2], c];

fadingPrimitive[rs + rb, rs - Abs[rb - Sqrt[x^2 + y^2]], c];


Up to this point everything works nice. The image size is exactly as large as the actual graphics:

smoothlyFadingColorDisk[1, Purple]


smoothlyFadingColorRing[0.25, 1.25, Blue]


But when I try to combine them, the image size suddenly gets much larger than the actual graphics:

Graphics[{


I tried ImageSize->Scaled[1], ImageSize->Full, ImageSize->All, ImageSize->Automatic - all fail or even make the disproportion even greater.

Show[


This works as expected, but I'd rather avoid show: I want to be able to use Insets to be able to reposition the graphics, and it seems I can't use Insets with Show.

Why does this happen? How to set this straight? Thanks in advance!

• closely related: 73522 – Kuba Feb 12 '15 at 9:11

The coordinate system of the enclosing Graphics is completely independent of the one used in the Inset. So you have to specify in Inset how it is to be positioned and sized relative to the enclosing Graphics. In your case, you just want to modify the size. That's the fourth argument in Inset (it's optional), so the code looks like this:
Graphics[{Inset[smoothlyFadingColorDisk[1, Purple], Automatic,