Creates the legend environment by:
Initializing environment with metadata
Calling build_legend_args() to construct legend arguments
Populating environment with arguments and positioning flags
Initializing margins and dimensions
build_legend_env(
legend,
legend_args,
by_dep,
lgnd_labs,
labeller = NULL,
type,
type_hints = NULL,
pch,
lty,
lwd,
col,
bg,
cex,
gradient,
lmar,
has_sub = FALSE,
has_cap = FALSE,
cap_text = NULL,
new_plot = TRUE,
dynmar_title_mar = NULL
)Environment with complete legend specification
Legend placement keyword or list
Additional legend arguments
The (deparsed) "by" grouping variable name
The legend labels
Function, character keyword, or dictionary (named vector or
list) for formatting or relabelling the labels. See tinylabel for the
accepted forms.
Plot type
Plotting character(s)
Line type(s)
Line width(s)
Color(s)
Background fill color(s)
Character expansion(s)
Logical indicating gradient legend
Legend margins (inner, outer)
Logical indicating presence of sub-caption
Logical indicating if plot.new should be called