Description Usage Arguments Examples
View source: R/customfunctions.R
Fill scale constructor for custom color palette
1 | scale_fill_alex(palette = "main", discrete = TRUE, reverse = FALSE, ...)
|
palette |
Character name of custom color palette |
discrete |
Boolean input as to whether color palette should be discrete or not |
reverse |
Boolean input to reverse the ordering of the returned color palette |
... |
Additional arguments to pass to palette_alex() |
1 2 3 4 5 6 7 8 9 | mtcars %>% ggplot(aes(x = hp, y = mpg, color = as.factor(cyl))) +
geom_line(size = 1.5, alpha = 0.5) +
scale_color_alex() +
theme_alex() +
xlab("Horsepower") +
ylab("Miles per Gallon") +
labs(
title = "Miles per Gallon vs Horsepower"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.