palette_timecycle {colorist}R Documentation

Make an HCL palette for visualizing a cyclical sequence of distributions

Description

This function generates an HCL palette for visualizing a cyclical sequence of distributions (e.g., a series of distributions describing species occurrence in each of 52 weeks of the annual cycle or a series of utilization distributions describing typical space use by an individual animal in each hour of a 24-hour daily cycle).

Usage

palette_timecycle(x, start_hue = 240, clockwise = TRUE)

Arguments

x

RasterStack or integer describing the number of layers for which colors need to be generated.

start_hue

integer between -360 and 360 representing the starting hue in an HCL color wheel. For further details, consult the documentation for colorspace::rainbow_hcl. The default value of 240 will start the palette at "blue".

clockwise

logical indicating which direction to move around color wheel. The default clockwise = TRUE will yield a "blue-green-yellow-pink-blue" palette when start_hue = 240, while clockwise = FALSE will yield a "blue-pink-yellow-green-blue" palette.

Value

A data frame with three columns:

See Also

palette_timeline for linear sequences of distributions and palette_set for unordered sets of distributions.

Other palette: palette_set(), palette_timeline()

Examples

# load field sparrow data
data(fiespa_occ)

# generate hcl color palette
pal <- palette_timecycle(fiespa_occ)
head(pal)

# visualize the palette in HCL space with colorspace::hclplot
library(colorspace)
hclplot(pal[pal$specificity == 100, ]$color)

[Package colorist version 0.1.3 Index]