Package 'poispalette'

Title: Poisson Palettes
Description: An R package for Poisson Consulting colour palettes.
Authors: Evan Amies-Galonski [aut, cre] (-3188), Joe Thorley [aut] , Poisson Consulting [cph, fnd]
Maintainer: Evan Amies-Galonski <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2024-11-01 16:19:42 UTC
Source: https://github.com/poissonconsulting/poispalette

Help Index


lines

Description

lines

Usage

lines

Format

An example data set for plotting

Examples

lines

points

Description

points

Usage

points

Format

An example data set for plotting

Examples

points

poisson colours

Description

poisson colours

Usage

pois_cols(colours = NULL)

Arguments

colours

Character names of Poisson colours

Value

A named vector of hex colours

Examples

pois_cols()

poisson palettes

Description

poisson palettes

Usage

pois_pal(palette = NULL)

Arguments

palette

Character names of Poisson palettes. One of 'discrete', 'hot', 'cool'.

Value

A named vector of hex colours

Examples

pois_pal()

Return function to subset a user provided colour palette

Description

Return function to subset a user provided colour palette

Usage

pois_pal_custom(palette, order = NULL, reverse = FALSE, ...)

Arguments

palette

Character name of palette in pois_palettes

order

A numeric or character vector indicating the order of colours in the palette. Can be a subset.

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments to pass to colourRampPalette()


Return function to subset poisson colour palette

Description

Return function to subset poisson colour palette

Usage

pois_pal_disc(palette = "discrete", order = NULL, reverse = FALSE, ...)

Arguments

palette

Character name of palette. See pos_pal() for palette options.

order

A numeric or character vector indicating the order of colours in the palette. Can be a subset.

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments to pass to colourRampPalette()


Return interpolated color gradient for a continuous poisson colour palette

Description

Return interpolated color gradient for a continuous poisson colour palette

Usage

pois_pal_grad(
  palette = "cool",
  reverse = FALSE,
  n_steps = 256,
  n_col = getOption("poispalette.n_col", NULL)
)

Arguments

palette

Character name of palette in pois_palettes, See pos_pal() for palette options.

reverse

Boolean indicating whether the palette should be reversed

n_steps

Number of steps in gradient

n_col

Number of colours to subset from the palette (optional)


discrete colour scale constructor for poisson colours

Description

discrete colour scale constructor for poisson colours

Usage

scale_colour_disc_poisson(
  ...,
  palette = getOption("poispalette.colours", "discrete"),
  order = NULL,
  reverse = FALSE
)

Arguments

...

Additional arguments passed to discrete_scale()

palette

Character name of palette in pois_palettes

order

A numeric or character vector indicating the order of colours in the palette. Can be a subset.

reverse

Boolean indicating whether the palette should be reversed


gradient colour scale constructor for poisson colours

Description

gradient colour scale constructor for poisson colours

Usage

scale_colour_grad_poisson(
  ...,
  palette = getOption("poispalette.gradient", "cool"),
  reverse = FALSE,
  n_steps = 256,
  n_col = getOption("poispalette.n_col", NULL)
)

Arguments

...

Additional arguments passed to scale_color_gradientn()

palette

Character name of palette in pois_palettes, or selection of colour names from pois_cols

reverse

Boolean indicating whether the palette should be reversed

n_steps

Number of steps in gradient

n_col

Number of colours to subset from the palette (optional)


discrete fill scale constructor for poisson colours

Description

discrete fill scale constructor for poisson colours

Usage

scale_fill_disc_poisson(
  ...,
  palette = getOption("poispalette.colours", "discrete"),
  order = NULL,
  reverse = FALSE
)

Arguments

...

Additional arguments passed to discrete_scale()

palette

Character name of palette in pois_palettes

order

A numeric or character vector indicating the order of colours in the palette. Can be a subset.

reverse

Boolean indicating whether the palette should be reversed


Gradient fill scale constructor for poisson colours

Description

Gradient fill scale constructor for poisson colours

Usage

scale_fill_grad_poisson(
  ...,
  palette = getOption("poispalette.gradient", "cool"),
  reverse = FALSE,
  n_steps = 256,
  n_col = getOption("poispalette.n_col", NULL)
)

Arguments

...

Additional arguments passed to scale_color_gradientn()

palette

Character name of palette in pois_palettes, or selection of colour names from pois_cols

reverse

Boolean indicating whether the palette should be reversed

n_steps

Number of steps in gradient

n_col

Number of colours to subset from the palette (optional)