Code Monkey home page Code Monkey logo

ggugent's Introduction

Important. This package is currently under development.

ggugent

The ggugent package provides a custom, opinionated ggplot2 theme (theme_ugent) tailored to the branding guidelines of Ghent University (UGent). This theme allows R users to create ggplot2 visualisations that align with the university’s style, including font, colours, and other aesthetic elements.

Installation

You can install the development version from GitHub.

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

Usage

After installation, you can use the theme_ugent function to apply the UGent theme to your ggplot2 objects. Here’s an example using the mtcars dataset.

library(ggplot2)
library(ggugent)
ggplot(data = mtcars, mapping = aes(x = wt, y = mpg)) +
  geom_point() +
  geom_smooth(
    method = "lm",
    formula = y ~ x,
    alpha = .15,
    colour = "#1E64C8"
  ) +
  facet_wrap(~cyl, ncol = 3) +
  scale_x_continuous(limits = c(0, 5.5), breaks = seq(0, 5, 1)) +
  scale_y_continuous(limits = c(5, 35)) +
  labs(
    title = "Motor Trend car road tests",
    subtitle = "Vehicles miles per gallon vs weight by number of cylinders",
    caption = "Source: Motor Trend US magazine",
    x = "Weight (x1,000 lbs)",
    y = "Miles / (US) gallon"
  ) +
  theme_ugent(
    base_size = 20,
    faculty = "EB"
  )

Features

  1. Custom Font. The theme uses ‘UGent Panno Text’ as the default font (and ‘Arial’ as secondary or fall-back font).
  2. Adaptable Text Size. The base_size parameter sets a standard font size from which relative sizes of other text elements are calculated.
  3. UGent Colour Theme. The theme uses UGent blue #1E64C8 as its base colour.
  4. Faculty Colours. The faculty_colour parameter specifies faculty colours through character shortcodes like “EB” for the Faculty of Economics and Business Administration.
    • LW for the Faculty of Arts and Philosophy (orange, #F1A42B)
    • RE for the Faculty of Law and Criminology (warm red, #DC4E28)
    • WE for the Faculty of Sciences (aqua, #2D8CA8)
    • GE for the Faculty of Medicine and Health Sciences (salmon pink, #E85E71)
    • EA for the Faculty of Engineering and Architecture (medium sky-blue, #8BBEE8)
    • EB for the Faculty of Economics and Business Administration (light green, #AEB050)
    • DI for the Faculty of Veterinary Medicine (purple, #825491)
    • PP for the Faculty of Psychology and Educational Sciences (warm orange, #FB7E3A)
    • BW for the Faculty of Bioscience Engineering (turquoise, #27ABAD)
    • FW for the Faculty of Pharmaceutical Sciences (light purple, #BE5190)
    • PS for the Faculty of Political and Social Sciences (green, #71A860)

Contributing

Contributions are appreciated! The development of this package is still in its very early phase. If you would like to contribute, please use a pull request. Issue reports are also warmly welcomed.

Licensing

The code in this project is licensed under MIT license. See LICENSE for more information.

ggugent's People

Contributors

llippens avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.