
Set how a gtscales legend should be rendered
gtscale_spec_set_legend.RdSet how a gtscales legend should be rendered
Arguments
- spec
A
gtscale_spec.- output
Output target for the legend. Use
"contextual"forgt-managed HTML/LaTeX source notes, or choose a specific output like"html","latex", or"typst".- placement
Legend placement target.
"source_note","title", and"subtitle"are currently implemented.- layout
Whether multiple legends in the same heading area should stack vertically or sit inline.
- align
Horizontal alignment for the legend container.
- show_border
Whether the legend bar, bin frame, and swatches should draw borders.
- border_color
Border color used for legend frames and swatches.
- border_radius
Border radius used for HTML and Typst legend frames.
- show_na
Whether to include an explicit missing-value legend entry.
- na_label
Label to use for missing values in the legend.
- na_color
Optional legend swatch color for missing values. When omitted and
show_na = TRUE, a neutral gray swatch is used.