# How to Grid two or more figures in Mathematica?

I am trying to combine the following two plots using Grid option. The problem in that in the combined figure, the Legends appear larger and spoil the look of the entire figure.

    legendPS1C1 =
With[{x = 0.005},
LineLegend[{Directive[Blue, Thickness[x]],
Directive[Red, Dashed, Thickness[x]]}, {"Sin(x)", "Cos(x)"},
LegendMarkerSize -> {{30, 2}}]];

legendPS2C2 =
With[{x = 0.005},
LineLegend[{Directive[Purple, DotDashed, Thickness[x]],
Directive[Black, Dotted, Thickness[x]]}, {"Sin(x)", "Cos(x)"},
LegendMarkerSize -> {{30, 2}}]];

A = Plot[{Sin[x], Cos[5 x]}, {x, -\[Pi], \[Pi]}, PlotRange -> All,
PlotStyle -> {{Blue, Thickness[0.005]}, {Red, Dashed,
Thickness[0.005]}}, Axes -> False, Frame -> True,
PlotLegends -> Placed[legendPS1C1, Top], GridLines -> {{0}, {0}},
FrameLabel -> {"x", Rotate["Sin(x), Cos(x)", 0 Degree]}]

B = Plot[{Sin[2 x], Cos[8 x]}, {x, -\[Pi], \[Pi]}, PlotRange -> All,
PlotStyle -> {{Purple, DotDashed, Thickness[0.005]}, {Black, Dashed,
Thickness[0.005]}}, Axes -> False, Frame -> True,
PlotLegends -> Placed[legendPS2C2, Bottom], GridLines -> {{0}, {0}},
FrameLabel -> {"x", Rotate["Sin(x), Cos(x)", 0 Degree]}]

grid = Grid[{{A}, {B}}, Spacings -> {2, 2}]

• Another way to see the problem is to consider that the plots should not be reduced in the combined figure. In that case the solution is : grid =Style[ Grid[{{A}, {B}}, Spacings -> {2, 2}],ImageSizeMultipliers->{1, 1}] – andre314 Oct 11 '17 at 18:21
• Thanks @andre. It worked for me. – Jee Oct 11 '17 at 18:53
• see also: ImageSizeMultipliers on mma.se – kglr Oct 11 '17 at 19:39