| wnba-scales | R Documentation |
Colour and fill scales that take their colors from a WNBA team, the
ggplot2 counterpart of wnba.colors. scale_color_wnba is an alias for
scale_colour_wnba.
scale_colour_wnba(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_color_wnba(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_fill_wnba(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
set |
Character string naming a WNBA team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
A ggplot2 scale, to be added to a plot with +.
Charles Crabtree charles.crabtree@monash.edu
wnba.colors for the raw palette, colorr.pal for the
palette function.
library(ggplot2)
ggplot(mtcars, aes(factor(cyl), mpg, fill = factor(cyl))) +
geom_boxplot() +
scale_fill_wnba("liberty") # New York Liberty
ggplot(mtcars, aes(wt, mpg, colour = hp)) +
geom_point(size = 3) +
scale_colour_wnba("liberty", discrete = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.