view_palette: View a palette

Description Usage Arguments Examples

View source: R/palettes.R

Description

Displays a palette using geom_col() and theme_void().

Usage

1

Arguments

palette

A character vector of colours to display.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
view_palette(wwfc_pal("wooly_bully")(8))

# display wwfc palettes
library(ggplot2)

wooly_bully <- view_palette(wwfc_pal("wooly_bully")(5)) +
    labs(title = '"wooly_bully" palette') +
    theme(plot.title = element_text(size = 18, hjust = .5))
sir_jack <- view_palette(wwfc_pal("sir_jack")(5)) +
  labs(title = '"sir_jack" palette') +
  theme(plot.title = element_text(size = 18, hjust = .5))
pal_plot <- cowplot::plot_grid(
  wooly_bully, sir_jack,
  nrow = 1
  )
pal_plot

lizardburns/wwplot documentation built on Jan. 5, 2022, 12:26 a.m.