knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

ggugent

R-CMD-check Travis build status

The goal of ggugent is to apply the official Ghent University (UGent) colours, theme to a ggplot2 graph.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("rdpauw/ggugent")

Prerequisites

To be able to apply the UGent theme, it is important to install the Arial-font via the package extrafont. First, you will have to load the package via library(extrafont) Afterwards, you can import all available fonts via font_import() to make the Arial-font available.

Functions

The ggugent package contains four distinct function families:

Example

This is a basic example of a ugent theme ggplot:

library(ggugent)
library(ggplot2)
data("diamonds")

ggplot(
  subset(diamonds, carat >= 2.2),
  aes(x = table, y = price, colour = cut)) +
  geom_point(alpha = 0.7) +
  geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
  scale_color_ugent_all() +
  ggugent_style()

Included colours and scales

library(scales)
show_col(pal_ugent()(3))
library(scales)
show_col(pal_ugent_all()(12))


rdpauw/ggugent documentation built on Dec. 22, 2021, 1:04 p.m.