I am trying to get a row of plots (which include legends and labels) using GraphicsRow, with vertical heights of the plots equal. I manually set the size and image padding of these plots so that the plots take up the same vertical space
verticalSize = 250;
p1 = Plot[Evaluate@Table[Cos[n x], {n, 1, 4}], {x, 0, 2 Pi},
Frame -> True, RotateLabel -> False, PlotRange -> All,
PlotLegends ->
Placed [Map[StringReplace["n= x", "x" -> ToString[#, InputForm]] &,
Table[n, {n, 1, 4}]], {Scaled[{0, 1}], {-0.1, 1.01}}],
Epilog -> Inset[Text[Style["(a)", 16]],
ImageScaled[{0.9, 0.9}], Alignment -> Center],
ImageSize -> {Automatic, verticalSize},
ImagePadding -> {{Automatic, Automatic}, {35, 4}}]
p2 = Plot[Evaluate@Table[(1/(\[Sigma] Sqrt[
2 Pi])) Exp[-0.5 (x/\[Sigma])^2], {\[Sigma], 1, 4}], {x,-10, 10},Frame -> True,
FrameLabel ->
{"x", "\[LeftBracketingBar]\!\(\*SubscriptBox[\(
[CapitalPsi]\), \
\(0\)]\)(x; \[Sigma])\!\(\*SuperscriptBox[\(\[RightBracketingBar]\), \
\(2\)]\)"},
RotateLabel -> False, PlotRange -> All,
PlotLegends ->
Placed [Map[
StringReplace["\[Sigma]= x", "x" -> ToString[#, InputForm]] &,
Table[n, {n, 1, 4}]], {Scaled[{0, 1}], {-0.1, 1.01}}],
Epilog ->
Inset[Text[Style["(b)", 16]], ImageScaled[{0.9, 0.9}],
Alignment -> Center], ImageSize -> {Automatic, verticalSize},
ImagePadding -> {{Automatic, Automatic}, {35, 4}}]
This produces plots
Ideally, I want to see these exact images at the size I see in the output cell side-by-side in one graphic. However, when I come to using Graphics Row, the output shows that the overall image size and the image padding have been altered