knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "figures/README-",
  fig.dpi = 300
)

ggbluebadge

The goal of ggbluebadge is to help R programmers produce figures that are consistent with CSIRO's visual identity.

Installation

ggbluebadge lives on GitHub for now, so you need to use devtools (or similar) to install it:

# install devtoos if you don't have it
install.packages("devtools")

devtools::install_github("waldnerf/ggbluebadge")
library(ggplot2)
library(dplyr)
library(tidyverse)

Color Palette

The Visual Identity

The colour palette used in ggbluebadge matches the new visual identity of the CSIRO (the codes within the colours are their hexadecimal codes).

Overview of the colour palettes

Official colours can be displayed as follows:

``` {r show-all, fig.height = 2.5, fig.width = 3.5} ggbluebadge::show_csiro_colours()

From this list, I chose just a few that I thought worked well together for colour and fill scales: main,  greys, primary, secondary, and data61.



``` {r main, fig.height = 3.5, fig.width = 3.5}
ggbluebadge::show_my_palette("main")

``` {r greys, fig.height = 3.5, fig.width = 3.5} ggbluebadge::show_my_palette("greys")

``` {r primary, fig.height = 3.5, fig.width = 3.5}
ggbluebadge::show_my_palette("primary")

{r secondary, fig.height = 3.5, fig.width = 3.5} ggbluebadge::show_my_palette("secondary")

Setup theme and scales

There are four variants of the theme-generating function theme_csiro():

  1. theme_csiro() sets the plot theme,

  2. theme_csiro_dark() has the same styling, just with a midnight blue background,

  3. theme_pub() is sober theme for publications.

Of course, you can mix and match the themes and the colour palettes... or even create your own (see the vignette for some examples).



waldnerf/ggbluebadge documentation built on March 7, 2020, 10:27 p.m.