powered by
Discrete colour fill scales for Analysis Function plots
scale_fill_discrete_af( palette = "main", palette_type = c("af"), reverse = FALSE, ... )
ggplot2 discrete fill scale
Name of palette to use; e.g. "main", "sequential", "focus." Default value is "main."
Currently only the Analysis Function palettes are supported. Defaults to "af".
Boolean value to indicate whether the palette should be reversed.
Additional arguments passed to scale type.
library(ggplot2) d <- subset(mpg, manufacturer == "ford") ggplot(d, aes(x = class, fill = class)) + geom_bar() + scale_fill_discrete_af()
Run the code above in your browser using DataLab