Title: | Palettes and Themes Consistent with The University of Warwick's Brand |
---|---|
Description: | Colour palettes and a 'ggplot2' theme that are consistent with The University of Warwick' branding. Built using the 'palettes' package, which provides methods for printing, formatting, casting and coercion, extraction and updating of components, plotting, colour mixing arithmetic, and colour interpolation. |
Authors: | Ella Kaye [aut, cre] |
Maintainer: | Ella Kaye <[email protected]> |
License: | CC0 |
Version: | 0.1.0 |
Built: | 2024-11-20 05:05:56 UTC |
Source: | https://github.com/Warwick-Stats-Resources/warwickplots |
theme_warwick()
is an extension of ggplot2::theme_minimal()
. See Details.
theme_warwick(base_size = 11, use = c("online", "print"))
theme_warwick(base_size = 11, use = c("online", "print"))
base_size |
numeric, base size for font |
use |
character, one of "online" or "print" (defaults to "online"), which determines which font is used |
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 long
Places 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.
## Not run: ggplot2::ggplot(mtcars, ggplot2::aes(mpg, wt)) + ggplot2::geom_point() + ggplot2::labs(title = "A demo plot") + theme_warwick() ## End(Not run)
## Not run: ggplot2::ggplot(mtcars, ggplot2::aes(mpg, wt)) + ggplot2::geom_point() + ggplot2::labs(title = "A demo plot") + theme_warwick() ## End(Not run)
Palettes consistent with The University of Warwick's brand.
warwick_palettes warwick_palettes_discrete warwick_palettes_sequential warwick_palettes_divergent
warwick_palettes warwick_palettes_discrete warwick_palettes_sequential warwick_palettes_divergent
warwick_palettes
An object of class palettes_palette
with 6
colour palettes.
warwick_palettes_discrete
An object of class palettes_palette
with
1 discrete colour palettes.
warwick_palettes_sequential
An object of class palettes_palette
with
3 sequential colour palettes.
warwick_palettes_divergent
An object of class palettes_palette
with
2 sequential colour palettes.
For more information on the University of Warwick's brand colours, see https://warwick.ac.uk/about/brand/brand-guidelines/colours/.
The primary palette is a combination of the primary brand colour (aubergine) and the five bright accent colours. These are the colours that the brand team uses for the graphs in their PowerPoint template.
The three sequential palettes run between the bright colour and its 30% tint.
Since the primary Warwick brand aubergine is much darker than the bright accent colours, it was too strong as a starting point for the aubergine side of the divergent palettes. To achieve a better balance, aubergine_ruby
starts with an 80% tint of the primary aubergine, and aubergine_teal
starts with a 70% tint.
https://github.com/Warwick-Stats-Resources/warwickplots
# Get all palettes by name names(warwick_palettes) # Plot a specific palette plot(warwick_palettes$primary) # Subset a palette warwick_palettes$primary[c(1, 3, 5)] #' # Plot all palettes ## Not run: plot(warwick_palettes) ## End(Not run)
# Get all palettes by name names(warwick_palettes) # Plot a specific palette plot(warwick_palettes$primary) # Subset a palette warwick_palettes$primary[c(1, 3, 5)] #' # Plot all palettes ## Not run: plot(warwick_palettes) ## End(Not run)