Package 'uiothemes'

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

Help Index


Colour and fill scale constructors for UiO colors

Description

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.

Usage

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, ...)

Arguments

palette

Character name of palette in uio_pal.

discrete

Logical indicating whether colour aesthetic is discrete or not

reverse

Logical indicating whether the palette should be reversed

...

Additional arguments passed to discrete_scale or scale_color_gradientn, used respectively when discrete is TRUE or FALSE

Examples

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()

ggplot themes for uio

Description

A selection of themes that fit with the UiO branding instructions.

Usage

theme_uio(base_size = 10)

theme_uio_dark(base_size = 10)

theme_uio_void(base_size = 10)

theme_uio_dark_void(base_size = 10)

Arguments

base_size

text size

Details

  • 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

Examples

## 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

Description

Function to extract uio colours as hex codes

Usage

uio_cols(...)

Arguments

...

Character names of uio_colors


UiO theme fonts

Description

Returns family name of UiO fonts, to be used in plots. If for instance used the the ggplot2-theme functions.

Usage

uio_font(type = c("body", "title"))

Arguments

type

body or title font type


Return function to interpolate a uio color palette

Description

Return function to interpolate a uio color palette

Usage

uio_pal(palette = "redblack", reverse = FALSE, ...)

Arguments

palette

Character name of palette in uio_palettes

reverse

Logical indicating whether the palette should be reversed

...

Additional arguments to pass to colorRampPalette