BarLegend
has an annoyingly large space at the bottom. I can see that this was added to make it line up with the frame of the plot when there is a bottom frame label (see e.g. here), but this does not work out well for all plot sizes, and it causes problems in specific situations.
How can I control this space?
Select the legend to see the spacing better:
This space is also much too large for a legend label placed below the legend.
Row[
{Framed@BarLegend["Rainbow",
Method -> {ImagePadding -> None, ImageMargins -> None,
PlotRangePadding -> None}, LegendMargins -> 0,
LegendLabel -> "foo"],
Framed@BarLegend["Rainbow",
Method -> {ImagePadding -> None, ImageMargins -> None,
PlotRangePadding -> None}, LegendMargins -> 0,
LegendLabel -> Placed["foo", Below]]}
]
LegendMargins
:BarLegend["Rainbow", LegendMargins -> {{0, 0}, {-10, 0}}]
$\endgroup$