| colorr.pal | R Documentation |
Turns a team palette into a palette function of the kind ggplot2 and
grDevices expect: call it with n and it returns n colors. When
n exceeds the number of colors the team actually has, the palette is interpolated
with colorRampPalette.
colorr.pal(league, set, reverse = FALSE, legacy = FALSE)
league |
Character string naming a league, as returned by
|
set |
Character string naming a team in that league. |
reverse |
Logical. If |
legacy |
Logical. If |
A function of one argument n returning a character vector of n hex
colors.
Charles Crabtree charles.crabtree@monash.edu
scale_fill_nba and friends, which wrap this for ggplot2.
pal <- colorr.pal("nba", "bucks")
pal(3)
pal(8) # interpolated past the team's own colors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.