if(curl::has_internet()){
library(ggplot2)
x <- get_popular_palettes()
ggplot(mtcars, aes(mpg)) +
geom_density(aes(fill = disp, group = disp)) +
scale_fill_palettehex_c(x)
ggplot(mtcars, aes(mpg)) +
geom_density(aes(fill = disp, group = disp)) +
scale_fill_palettehex_c(x, 3)
ggplot(mtcars, aes(mpg, disp, colour = factor(cyl))) +
geom_point() +
scale_color_palettehex_d(x)
ggplot(mtcars, aes(mpg, disp, colour = factor(cyl))) +
geom_point() +
scale_color_palettehex_d(x, 1872)
}
Run the code above in your browser using DataLab