3 added 461 characters in body
source | link

This is non-ideal for so many reasons, but (at least in the front end) it does what you describe:

plot = Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True]

Overlay[{
  Graphics[{}, Sequence @@ Options[plot], 
   Method -> {"GridLinesInFront" -> True}, 
   GridLines -> Automatic, 
   GridLinesStyle -> White, 
   Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]}
   ],
  Show[plot, FrameStyle -> Opacity[0]]
}]

Mathematica graphics

When it comes to exporting / copying / resizing, it becomes increasingly inconvenient though. I think I would generate my own grid lines just to avoid having to deal with a non-Graphics object.

EDIT:

Here's a hack to at least let you resize it interactively:

Pane[
 Overlay[{
   Graphics[{}, Sequence @@ Options[plot],
    Method -> {"GridLinesInFront" -> True},
    GridLines -> Automatic,
    GridLinesStyle -> White, 
    Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]},
    ImageSize -> Full],
   Show[plot, FrameStyle -> Opacity[0], ImageSize -> Full]
   }],
 ImageSize -> Large,
 AppearanceElements -> {"ResizeArea"}
]

EDIT 2:

Better resizing. Just don't right click -> Save As ... It'll save only one graphic.

DynamicModule[{sz = Medium},
 Overlay[{
   Graphics[{}, Sequence @@ Options[plot],
    Method -> {"GridLinesInFront" -> True},
    GridLines -> Automatic,
    GridLinesStyle -> White, 
    Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]},
    ImageSize -> Dynamic[sz]],
   Show[plot, FrameStyle -> Opacity[0], ImageSize -> Dynamic[sz]]
   }, All, 2]
 ]

This is non-ideal for so many reasons, but (at least in the front end) it does what you describe:

plot = Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True]

Overlay[{
  Graphics[{}, Sequence @@ Options[plot], 
   Method -> {"GridLinesInFront" -> True}, 
   GridLines -> Automatic, 
   GridLinesStyle -> White, 
   Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]}
   ],
  Show[plot, FrameStyle -> Opacity[0]]
}]

Mathematica graphics

When it comes to exporting / copying / resizing, it becomes increasingly inconvenient though. I think I would generate my own grid lines just to avoid having to deal with a non-Graphics object.

EDIT:

Here's a hack to at least let you resize it interactively:

Pane[
 Overlay[{
   Graphics[{}, Sequence @@ Options[plot],
    Method -> {"GridLinesInFront" -> True},
    GridLines -> Automatic,
    GridLinesStyle -> White, 
    Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]},
    ImageSize -> Full],
   Show[plot, FrameStyle -> Opacity[0], ImageSize -> Full]
   }],
 ImageSize -> Large,
 AppearanceElements -> {"ResizeArea"}
]

This is non-ideal for so many reasons, but (at least in the front end) it does what you describe:

plot = Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True]

Overlay[{
  Graphics[{}, Sequence @@ Options[plot], 
   Method -> {"GridLinesInFront" -> True}, 
   GridLines -> Automatic, 
   GridLinesStyle -> White, 
   Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]}
   ],
  Show[plot, FrameStyle -> Opacity[0]]
}]

Mathematica graphics

When it comes to exporting / copying / resizing, it becomes increasingly inconvenient though. I think I would generate my own grid lines just to avoid having to deal with a non-Graphics object.

EDIT:

Here's a hack to at least let you resize it interactively:

Pane[
 Overlay[{
   Graphics[{}, Sequence @@ Options[plot],
    Method -> {"GridLinesInFront" -> True},
    GridLines -> Automatic,
    GridLinesStyle -> White, 
    Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]},
    ImageSize -> Full],
   Show[plot, FrameStyle -> Opacity[0], ImageSize -> Full]
   }],
 ImageSize -> Large,
 AppearanceElements -> {"ResizeArea"}
]

EDIT 2:

Better resizing. Just don't right click -> Save As ... It'll save only one graphic.

DynamicModule[{sz = Medium},
 Overlay[{
   Graphics[{}, Sequence @@ Options[plot],
    Method -> {"GridLinesInFront" -> True},
    GridLines -> Automatic,
    GridLinesStyle -> White, 
    Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]},
    ImageSize -> Dynamic[sz]],
   Show[plot, FrameStyle -> Opacity[0], ImageSize -> Dynamic[sz]]
   }, All, 2]
 ]
2 added 525 characters in body
source | link

This is non-ideal for so many reasons, but (at least in the front end) it does what you describe:

plot = Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True]

Overlay[{
  Graphics[{}, Sequence @@ Options[plot], 
   Method -> {"GridLinesInFront" -> True}, 
   GridLines -> Automatic, 
   GridLinesStyle -> White, 
   Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]}
   ],
  Show[plot, FrameStyle -> Opacity[0]]
}]

Mathematica graphics

When it comes to exporting / copying / resizing, it becomes increasingly inconvenient though. I think I would generate my own grid lines just to avoid having to deal with a non-Graphics object.

EDIT:

Here's a hack to at least let you resize it interactively:

Pane[
 Overlay[{
   Graphics[{}, Sequence @@ Options[plot],
    Method -> {"GridLinesInFront" -> True},
    GridLines -> Automatic,
    GridLinesStyle -> White, 
    Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]},
    ImageSize -> Full],
   Show[plot, FrameStyle -> Opacity[0], ImageSize -> Full]
   }],
 ImageSize -> Large,
 AppearanceElements -> {"ResizeArea"}
]

This is non-ideal for so many reasons, but (at least in the front end) it does what you describe:

plot = Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True]

Overlay[{
  Graphics[{}, Sequence @@ Options[plot], 
   Method -> {"GridLinesInFront" -> True}, 
   GridLines -> Automatic, 
   GridLinesStyle -> White, 
   Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]}
   ],
  Show[plot, FrameStyle -> Opacity[0]]
}]

Mathematica graphics

When it comes to exporting / copying / resizing, it becomes increasingly inconvenient though. I think I would generate my own grid lines just to avoid having to deal with a non-Graphics object.

This is non-ideal for so many reasons, but (at least in the front end) it does what you describe:

plot = Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True]

Overlay[{
  Graphics[{}, Sequence @@ Options[plot], 
   Method -> {"GridLinesInFront" -> True}, 
   GridLines -> Automatic, 
   GridLinesStyle -> White, 
   Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]}
   ],
  Show[plot, FrameStyle -> Opacity[0]]
}]

Mathematica graphics

When it comes to exporting / copying / resizing, it becomes increasingly inconvenient though. I think I would generate my own grid lines just to avoid having to deal with a non-Graphics object.

EDIT:

Here's a hack to at least let you resize it interactively:

Pane[
 Overlay[{
   Graphics[{}, Sequence @@ Options[plot],
    Method -> {"GridLinesInFront" -> True},
    GridLines -> Automatic,
    GridLinesStyle -> White, 
    Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]},
    ImageSize -> Full],
   Show[plot, FrameStyle -> Opacity[0], ImageSize -> Full]
   }],
 ImageSize -> Large,
 AppearanceElements -> {"ResizeArea"}
]
1
source | link

This is non-ideal for so many reasons, but (at least in the front end) it does what you describe:

plot = Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True]

Overlay[{
  Graphics[{}, Sequence @@ Options[plot], 
   Method -> {"GridLinesInFront" -> True}, 
   GridLines -> Automatic, 
   GridLinesStyle -> White, 
   Prolog -> {LightGray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]}
   ],
  Show[plot, FrameStyle -> Opacity[0]]
}]

Mathematica graphics

When it comes to exporting / copying / resizing, it becomes increasingly inconvenient though. I think I would generate my own grid lines just to avoid having to deal with a non-Graphics object.