View source: R/theme_nocturnal.R
theme_nocturnal | R Documentation |
This plot theme was inspired by a need to simultaneously plot data and maintain a reasonable level of dark-adapted (scotopic) visual ability while doing fieldwork at night.
theme_nocturnal()
can be used in the same way as any of the native ggplot2 themes.
theme_nocturnal()
To make adjustments to your plot's theme while using this function, using ggplot2's
theme
in a line proceeding theme_nocturnal()
.
#Creating a plot with theme_nocturnal library(ggplot2) DarkPlot <- ggplot(cars, aes(speed, dist)) + geom_point(color = "grey80") + #Note the specification of a light color for the points theme_nocturnal() #Changing the axis text size of a theme_nocturnal plot DarkPlot2 <- DarkPlot + theme(axis.text = element_text(size = 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.