I am creating two plots and using Show to overlay, however the legend has a very large inter-line spacing. This answer suggests using Image Size but my legend is not a separate graphics object. This other solution usings Spacings seems to have the same issue. That or I cannot figure out how to use Spacings properly, I've tried incorporating it into PlotLegends
, but no luck.
I would like to have single-line spacing in the legend, without changing the ImageSize or the font size.
MWE
x = Range[0, 10];
y = x^2 * RandomReal[];
plt1 = ListPlot[list, PlotStyle -> Blue, PlotRange -> {0, 100},
Frame -> True, FrameLabel -> {Style["Distance [m]", 8], "Conc"},
PlotLabel -> Style["Title", 10
], ImageSize -> Small,
PlotLegends -> Placed[{Style["numerical", 8, Black]}, {Left, Top}],
LabelStyle -> Black, FrameTicksStyle -> 8]
plt2 = Plot[x^2, {x, 0, 10}, PlotStyle -> {Thick, Red},
PlotRange -> {0, 100}, Frame -> True, ImageSize -> Small,
PlotLegends -> Placed[{Style["analytical", 8, Black]}, {Left, Top}],
LabelStyle -> Black, FrameTicksStyle -> 8]
Show[plt2, plt1]
PlotLegends -> Placed[{Style["numerical", 8, Black]}, Scaled[{0.27, 0.8}]
$\endgroup$Scaled[{0.27, 0.8}]
in the legend if I put it before of after the{Left, Top}
braces, or it has no impact on the spacing if I try put it within the first set of braces $\endgroup$