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.
To make adjustments to your plot's theme while using this function, using ggplot2's
theme in a line proceeding
1 2 3 4 5 6 7 8 9 10
#Creating a plot with theme_nocturnal 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.