Description Usage Arguments See Also Examples
Fill scale constructor for FT colors
1 2 | scale_fill_ft(palette = "main", discrete = TRUE, reverse = FALSE,
...)
|
palette |
Character name of a palette |
discrete |
Boolean indicating whether color aesthetic is discrete or not |
reverse |
Boolean indicating whether the palette should be reversed |
... |
Additional arguments passed to discrete_scale() or scale_color_gradientn() |
1 2 3 4 5 6 7 8 9 10 11 | df <- data.frame(
c1 = rep(c("a","b"),3),
c2 = rep(c("c","d","e"), each = 2),
x = runif(6)
)
library(ggplot2)
# plot with discrete color scale
ggplot(df) +
geom_bar(aes(c1, x, fill = c2), stat = "identity") +
scale_fill_ft()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.