Learn R Programming

tinyplot (version 0.8.0)

draw_gradient_swatch: Draw gradient (continuous) legend swatch

Description

For gradient legends, we draw a custom color swatch using grDevices::as.raster and add labels, tick marks, and title manually.

Usage

draw_gradient_swatch(
  legend_args,
  fklgnd,
  lmar,
  outer_side,
  outer_end,
  outer_right,
  outer_bottom,
  user_inset = FALSE
)

Value

NULL (draws gradient legend as side effect)

Arguments

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