Description Usage Arguments Value Examples
Activate dark mode on a 'ggplot2' theme
1 2 |
.theme |
ggplot2 theme object |
verbose |
print messages (default: TRUE) |
force_geom_invert |
Force the inversion of geom defaults for fill and color/colour (default: FALSE) |
dark version of theme
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(ggplot2)
p1 <- ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
geom_point()
p1 # theme returned by theme_get()
p1 + dark_mode() # activate dark mode on theme returned by theme_get()
p2 <- ggplot(iris, aes(Sepal.Width, Sepal.Length)) +
geom_point() +
facet_wrap(~ Species)
p2 + dark_mode(theme_minimal()) # activate dark mode on another theme
invert_geom_defaults() # restore geom defaults to their original values
|
Inverted geom defaults of fill and color/colour.
To change them back, use invert_geom_defaults().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.