lepidochroma_display {lepidochroma}R Documentation

Palette preview

Description

Displays a preview of a palette or a set of palettes with the specified number of colours in a plot.

Usage

lepidochroma_display(
  name = NULL,
  n = NULL,
  type = c("all", "discrete", "continuous"),
  colourblind_only = FALSE
)

Arguments

name

Palette name (see the name column in the data frame returned by lepidochroma_palettes() for a list of available options). This argument is case insensitive. If it is not specified, all palettes matching the properties indicated in the type and colourblind_only arguments will be displayed.

n

Number of colours to display. It is an optional argument, if it is not specified, the plot will display all the available colours.

type

The type of palettes to be displayed ("all", "discrete", or "continuous"). This argument is ignored if name is specified. It defaults to "all".

colourblind_only

A logical value. If TRUE, display only colour blind friendly palettes. This argument is ignored if name is specified. It defaults to FALSE.

Value

No return value, called for side effects.

Examples

# Discrete palette
lepidochroma_display("parthenos", 3)
# Continuous palette
lepidochroma_display("battus", 30)


[Package lepidochroma version 0.1.0 Index]