knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "figures/README-", fig.dpi = 300 )
The goal of ggbluebadge is to help R programmers produce figures that are consistent with CSIRO's visual identity.
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)
The colour palette used in ggbluebadge matches the new visual identity of the CSIRO (the codes within the colours are their hexadecimal codes).
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")
There are four variants of the theme-generating function theme_csiro():
theme_csiro() sets the plot theme,
theme_csiro_dark() has the same styling, just with a midnight blue background,
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).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.