oecd_palette: An OECD palette generator

Description Usage Arguments Value Source Examples

View source: R/OECD_palette.R

Description

This is a small palette generator for OECD graphs that generates color vectors to be used in graphs

Usage

1
oecd_palette(name, n, type = c("discrete", "continuous"))

Arguments

name

Name of desired palette. Current choice is: oecd

n

Number of colors desired. If omitted, uses all colours.

type

Either "continuous" or "discrete". Use continuous if you want to automatically interpolate between colours.

Value

A vector of colours.

Source

Adapted from https://github.com/karthik/wesanderson/blob/master/R/colors.R

Examples

1
2
3
4
5
6
7
oecd_palette("oecd")

# If you need more colours than normally found in a palette, you
# can use a continuous palette to interpolate between existing
# colours
pal <- oecd_palette(21, name = "oecd", type = "continuous")
image(volcano, col = pal)

BBieri/WP6RTools documentation built on Dec. 17, 2021, 9:50 a.m.