Returns a function of n, which is the shape ggplot2 and scales expect.
Rarely needed directly: the scale_*_killer_*() family calls this for you.
Usage
killer_pal_fun(
palette = "greatest_hits",
type = c("qualitative", "sequential", "diverging"),
direction = 1
)Arguments
- palette
Palette name, e.g.
"flash"or"opera_night". Seekiller_names().- type
Palette type:
"qualitative"for unordered categories,"sequential"for ordered low-to-high values,"diverging"for values spread either side of a meaningful midpoint.- direction
1for the palette's natural order,-1to reverse it.
