Wolfram Technology Guide: Automated Computational Aesthetics  previous | next 
Automatic Whitespace Minimization in Grids
Mathematica does global optimization to determine the scaling of each individual graphic in a grid.
In[1]:=

Click for copyable input
GraphicsGrid[

 Table[Graphics[{LightGreen, EdgeForm[Black], Rectangle[]}, 

   AspectRatio -> RandomReal[{0, 3}]], {5}, {5}]]
Out[1]=