legend
Mojo module 🡭
legend
Legends: where they go, how wide they are, and the four kinds that get drawn.
Split out of plot.mojo. A legend is laid out before anything
is drawn, because its width comes off the plot area – _legend_layout
and _legend_reserve_for answer “how much room does this chart owe its
legend” so the frame can be sized around the answer.
Four kinds: the categorical swatch column (_draw_legend, and
_draw_legend_at for marks that place their own), and continuous color
and size ramps, each in a vertical and a horizontal form.