# Why is plotGrid acting this way?

A couple of days ago I discovered the plotGrid function from this answer here (written by @Jens). Since it seemed interesting I tried playing around with it a bit and I'm currently facing a problem which I don't really understand...

Consider the following code:

(* taken from: https://mathematica.stackexchange.com/a/6882/53872 *)
plotGrid[l_List, w_, h_, opts : OptionsPattern[]] :=
topPadding = 0, widths, heights, dimensions, positions,
frameOptions =
FilterRules[{opts},
FilterRules[Options[Graphics],
Except[{ImagePadding, Frame, FrameTicks}]]]}, {ny, nx} =
Dimensions[l];
widths = (w - 2 sidePadding)/nx Table[1, {nx}];
heights = (h - 2 sidePadding)/ny Table[1, {ny}];
positions =
Transpose@
Partition[
Tuples[Prepend[Accumulate[Most[#]], 0] & /@ {widths, heights}],
ny];
Graphics[
Table[Inset[
Show[l[[ny - j + 1, i]],
positions[[j, i]], {Left, Bottom}, {widths[[i]],
heights[[j]]}], {i, 1, nx}, {j, 1, ny}],
PlotRange -> {{0, w}, {0, h}}, ImageSize -> {w, h},
Evaluate@Apply[Sequence, frameOptions]]]

GenerateRandomMeshRegion[] := Module[{},
pts = RandomReal[{2, 1}, {25, 2}];
test = VoronoiMesh[pts];
Return[Show[test]]];

TableOfPlots =
Table[GenerateRandomMeshRegion[], {n, 1, 2}, {m, 1, 2}];

plotGrid[TableOfPlots, 400, 400, ImagePadding -> 0]


with output:

Can someone explain to me why there is a horizontal gap between the different MeshRegions and how you would fix that? If I try the example @Jens gives in his answer there is no such vertical gap, so I'm wondering where I added it by accident...

There is a gap between the columns of the mesh diagrams because VoronoiMesh, by default, adds a little plot range padding to its graphics. The gap can be eliminated by giving VoronoiMesh the option PlotRangePadding -> 0. Like so:
generateRandomMeshRegion[] :=