Title: | Branding themes for the University of Oslo, Norway |
---|---|
Description: | Contains templates, themeing files and functions. Made specifically for branding purposes for the University of Oslo. |
Authors: | Athanasia Mo Mowinckel [aut, cre]
|
Maintainer: | Athanasia Mo Mowinckel <[email protected]> |
License: | CC BY 4.0 |
Version: | 0.1.0 |
Built: | 2025-02-20 03:59:48 UTC |
Source: | https://github.com/capro-uio/uiothemes |
These scale functions help alter ggplot2 colour and fill
to colours in the UiO branding scheme.
See the colour palettes in uio_pal
for
variations you can choode from.
scale_colour_uio(palette = "redblack", discrete = TRUE, reverse = FALSE, ...) scale_color_uio(palette = "redblack", discrete = TRUE, reverse = FALSE, ...) scale_fill_uio(palette = "redblack", discrete = TRUE, reverse = FALSE, ...)
scale_colour_uio(palette = "redblack", discrete = TRUE, reverse = FALSE, ...) scale_color_uio(palette = "redblack", discrete = TRUE, reverse = FALSE, ...) scale_fill_uio(palette = "redblack", discrete = TRUE, reverse = FALSE, ...)
palette |
Character name of palette in |
discrete |
Logical indicating whether colour aesthetic is discrete or not |
reverse |
Logical indicating whether the palette should be reversed |
... |
Additional arguments passed to |
library(ggplot2) ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + scale_colour_uio(discrete = FALSE) ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + scale_colour_uio(discrete = FALSE, reverse = TRUE) ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + scale_colour_uio(discrete = FALSE) ggplot(mtcars, aes(mpg, disp, colour = factor(cyl))) + geom_point(size = 5) + scale_colour_uio()
library(ggplot2) ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + scale_colour_uio(discrete = FALSE) ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + scale_colour_uio(discrete = FALSE, reverse = TRUE) ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + scale_colour_uio(discrete = FALSE) ggplot(mtcars, aes(mpg, disp, colour = factor(cyl))) + geom_point(size = 5) + scale_colour_uio()
A selection of themes that fit with the UiO branding instructions.
theme_uio(base_size = 10) theme_uio_dark(base_size = 10) theme_uio_void(base_size = 10) theme_uio_dark_void(base_size = 10)
theme_uio(base_size = 10) theme_uio_dark(base_size = 10) theme_uio_void(base_size = 10) theme_uio_dark_void(base_size = 10)
base_size |
text size |
theme_uio - base theme for UiO
theme_uio_dark - dark/inverted version of base theme
theme_uio_void - base theme without axis information or grid
theme_uio_darl_void - dark/inverted theme without axis information or grid
## Not run: library(ggplot2) ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + theme_uio() ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + theme_uio_dark() ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + theme_uio_void() ggplot(mtcars, aes(mpg, disp, colour = factor(cyl))) + geom_point(size = 5) + theme_uio_dark_void() ## End(Not run)
## Not run: library(ggplot2) ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + theme_uio() ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + theme_uio_dark() ggplot(mtcars, aes(mpg, disp, colour = cyl)) + geom_point(size = 5) + theme_uio_void() ggplot(mtcars, aes(mpg, disp, colour = factor(cyl))) + geom_point(size = 5) + theme_uio_dark_void() ## End(Not run)
Function to extract uio colours as hex codes
uio_cols(...)
uio_cols(...)
... |
Character names of uio_colors |
Returns family name of UiO fonts, to be used in plots. If for instance used the the ggplot2-theme functions.
uio_font(type = c("body", "title"))
uio_font(type = c("body", "title"))
type |
body or title font type |
Return function to interpolate a uio color palette
uio_pal(palette = "redblack", reverse = FALSE, ...)
uio_pal(palette = "redblack", reverse = FALSE, ...)
palette |
Character name of palette in uio_palettes |
reverse |
Logical indicating whether the palette should be reversed |
... |
Additional arguments to pass to |