Description Usage Arguments Value Examples
This is the default fill scale for the nature palette. It does not generate colour-blind safe palettes. These are the palettes to choose from:
uyuni
okavango
lakelouise
provence
halong
vatnajokull
arashiyama
mountcook
benagil
bryce
jozi
main
Palette Colors inspired by:
https://medium.com/sketch-app-sources/10-color-palettes-from-the-natural-world-to-inspire-your-creative-streak-bc2fb73d161e
Palette made ffg blog post:
https://drsimonj.svbtle.com/creating-corporate-colour-palettes-for-ggplot2
1 2 | scale_fill_nature(palette = "main", discrete = TRUE, reverse = FALSE,
...)
|
palette |
Character name of palette in nature_palettes |
discrete |
Boolean indicating whether colour aesthetic is discrete or not |
reverse |
Boolean indicating whether the palette should be reversed |
... |
Additional arguments passed to discrete_scale() or scale_fill_gradientn(), used respectively when discrete is TRUE or FALSE |
Fill scale of nature palette
1 2 3 4 5 6 | # Fill by discrete variable with different palette + remove legend (guide)
library(ggplot2)
ggplot(mpg, aes(manufacturer, fill = manufacturer)) +
geom_bar() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_fill_nature(palette = "vatnajokull", guide = "none")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.