20.6 Scales
Example Build a wrapper for a new palette to an existing scale. This is done by providing a new palette scale into the relevant basic scale.
function (name = waiver(), ..., alpha = 1, begin = 0, end = 1,
direction = 1, option = "D", values = NULL, space = "Lab",
na.value = "grey50", guide = "colourbar", aesthetics = "fill")
{
continuous_scale(aesthetics, name = name, palette = pal_gradient_n(pal_viridis(alpha,
begin, end, direction, option)(6), values, space), na.value = na.value,
guide = guide, ...)
}
<bytecode: 0x55a50aec0d38>
<environment: namespace:ggplot2>