Code
library("qnp")
ggplot2::ggplot(mtcars, ggplot2::aes(wt, mpg, colour = factor(cyl))) +
ggplot2::geom_point() +
theme_morrison() +
scale_colour_morrison()A ggplot2 theme shared by the lab’s notes sites. It is ggplot2::theme_bw() with the legend at the bottom and serif text, as in the rme notes. The plot background matches one of the sites’ page palettes, so a figure sits on the page without a white box.
theme_morrison(
base_size = 12,
base_family = "serif",
palette = c("light", "offwhite", "parchment")
)
base_size
|
A single number: the base font size in points. |
base_family
|
A single string: the font family. |
palette
|
A single string, one of “light”, “offwhite” or “parchment”: the site palette whose page colour is the plot background. “light” is white. Figures on the sites’ dark theme keep the light plate, so there is no dark palette.
|
A ggplot2::theme object.
library("qnp")
ggplot2::ggplot(mtcars, ggplot2::aes(wt, mpg, colour = factor(cyl))) +
ggplot2::geom_point() +
theme_morrison() +
scale_colour_morrison()