theme_warwick()
is an extension of ggplot2::theme_minimal()
. See Details.
Usage
theme_warwick(base_size = 11, use = c("online", "print"))
Arguments
- base_size
numeric, base size for font
- use
character, one of "online" or "print" (defaults to "online"), which determines which font is used
Details
theme_warwick()
is an extension of ggplot2::theme_minimal()
, offering the
following in addition:
Spacing, giving the text room to breathe
Uses
ggtext::element_textbox_simple()
for the plot title and subtitle, to enable use of markdown and CSS styling, and text-wrapping if the title/subtitle is longPlaces the legend above the plot
Uses Lato or Avenir Next font (for online or print use respectively), if your system is set up for it
Note that any theme_warwick()
defaults can be overridden with a subsequent call to theme()
.
For further details, including how to ensure your system is set up to use custom fonts, see the warwickplots vignette. For more examples, see the using warwickplots with ggplot2 vignette.
Examples
if (FALSE) {
ggplot2::ggplot(mtcars, ggplot2::aes(mpg, wt)) +
ggplot2::geom_point() +
ggplot2::labs(title = "A demo plot") +
theme_warwick()
}