| Title: | Colour Plots with Palettes from Academic Institutions | 
| Version: | 0.0.2 | 
| Description: | Functionality to allow users to easily colour plots with the colour palettes of various academic institutions. | 
| License: | MIT + file LICENSE | 
| Encoding: | UTF-8 | 
| RoxygenNote: | 7.2.1 | 
| URL: | https://github.com/hwarden162/AcademicThemes | 
| BugReports: | https://github.com/hwarden162/AcademicThemes/issues | 
| Suggests: | covr, knitr, rmarkdown, scales, testthat (≥ 3.0.0), tidyverse | 
| Config/testthat/edition: | 3 | 
| Imports: | ggplot2, grDevices | 
| VignetteBuilder: | knitr | 
| NeedsCompilation: | no | 
| Packaged: | 2024-02-26 09:08:24 UTC; hwarden | 
| Author: | Hugh Warden | 
| Maintainer: | Hugh Warden <hugh.warden@outlook.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2024-02-26 09:20:12 UTC | 
Get An Academic Colour Palette
Description
Return either a specific colour palette or all colour palettes offered by
AcademicThemes.
Usage
academic_colour_palette(palette = NA, n = NA)
Arguments
| palette | A string containing the name of the palette to be returned. If no name is given then all palettes are returned instead. | 
| n | A number indicating how many different colours should be included in the palette. If not specified only the specific colours in the palette will be returned. | 
Value
A single vector or a list of vectors containing HEX codes for academic colour palettes.
Examples
# Get the colour palette used by the UKRI
academic_colour_palette("ukri_mrc")
Get The Academic Colour Palette Names
Description
Get The Academic Colour Palette Names
Usage
academic_colour_palette_names()
Value
A vector of the names of the colour palettes available in AcademicThemes.
Examples
academic_colour_palette_names()
Scale Plot Colours With Academic Themes (Continuous)
Description
Scale Plot Colours With Academic Themes (Continuous)
Usage
scale_colour_academic_c(palette_name, ...)
Arguments
| palette_name | The name of a colour palette in  | 
| ... | Arguments passed to  | 
Value
A layer that can be added to a ggplot2 object.
Examples
library(ggplot2)
ggplot(
  data.frame(
    x = runif(1500),
    y = runif(1500)
  ),
  aes(x = x, y = y, colour = x)
) +
  geom_point() +
  scale_colour_academic_c("cruk") +
  theme_classic() +
  labs(
    x = "X-Axis",
    y = "Y-Axis",
    colour = "Colour"
  )
Scale Plot Colours With Academic Themes (Discrete)
Description
Scale Plot Colours With Academic Themes (Discrete)
Usage
scale_colour_academic_d(palette_name, ...)
Arguments
| palette_name | The name of a colour palette in  | 
| ... | Arguments passed to  | 
Value
A layer that can be added to a ggplot2 object.
Examples
library(ggplot2)
ggplot(
  data.frame(
    x = runif(1500),
    y = runif(1500),
    c = sample(LETTERS[1:3], 1500, replace = TRUE)
  ),
  aes(x = x, y = y, colour = c)
) +
  geom_point() +
  scale_colour_academic_d("cruk") +
  theme_classic() +
  labs(
    x = "X-Axis",
    y = "Y-Axis",
    colour = "Colour"
  )
Scale Plot Fills With Academic Themes (Continuous)
Description
Scale Plot Fills With Academic Themes (Continuous)
Usage
scale_fill_academic_c(palette_name, ...)
Arguments
| palette_name | The name of a colour palette in  | 
| ... | Arguments passed to  | 
Value
A layer that can be added to a ggplot2 object.
Examples
library(ggplot2)
ggplot(
  data.frame(
    x = rnorm(10000),
    y = rnorm(10000)
  ),
  aes(x = x, y = y)
) +
  geom_hex() +
  scale_fill_academic_c("cruk") +
  theme_classic() +
  labs(
    x = "X-Axis",
    y = "Y-Axis",
    fill = "Fill"
  )
Scale Plot Fills With Academic Themes (Discrete)
Description
Scale Plot Fills With Academic Themes (Discrete)
Usage
scale_fill_academic_d(palette_name, ...)
Arguments
| palette_name | The name of a colour palette in  | 
| ... | Arguments passed to  | 
Value
A layer that can be added to a ggplot2 object.
Examples
library(ggplot2)
ggplot(
  data.frame(
    x = LETTERS[1:5],
    y = 5:1
  ),
  aes(x = x, y = y, fill = x)
) +
  geom_col() +
  scale_fill_academic_d("cruk") +
  theme_classic() +
  labs(
    x = "X-Axis",
    y = "Y-Axis",
    fill = "Fill"
  )