The use of fitbox with a subfigure. Note that the optional argument for the command counts the lines for the subcaptions.
(a) First Napoleon (b) Second Napoleon
(c) Third Napoleon (d) Fourth Napoleon
(e) Fifth Napoleon (f) Sixth Napoleon
Figure 1: Six Napoleons, \SetFitboxLayout[subcaplines=1]{3}{2}
Figure 2: Six Napoleons, no subcaptions, \SetFitboxLayout{3}{2}
(a) First Napoleon (b) Second Napoleon (c) Third Napoleon
(d) Fourth Napoleon (e) Fifth Napoleon (f) Sixth Napoleon
Figure 3: Six Napoleons, another arrangement
\SetFitboxLayout[subcaplines=1, maincaplines=2]{2}{3}