View source: R/legend_gradient.R
| draw_gradient_swatch | R Documentation |
For gradient legends, we draw a custom color swatch using grDevices::as.raster and add labels, tick marks, and title manually.
draw_gradient_swatch(
legend_args,
fklgnd,
lmar,
outer_side,
outer_end,
outer_right,
outer_bottom,
user_inset = FALSE
)
legend_args |
Legend arguments list |
fklgnd |
Fake legend object (from drawing with plot=FALSE) |
lmar |
Legend margins |
outer_side |
Logical flag for outer side placement |
outer_end |
Logical flag for outer end placement |
outer_right |
Logical flag for outer right placement |
outer_bottom |
Logical flag for outer bottom placement |
user_inset |
Logical flag indicating user-supplied inset |
NULL (draws gradient legend as side effect)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.