st_assign_colors: st_assign_colors

Description Usage Arguments Value Examples

View source: R/st_assign_colors.R

Description

Bin numeric data and assign colors for plotting

Usage

1
2
3
4
5
6
7
8
9
st_assign_colors(
  starsObj1,
  attrOf1,
  starsObj2,
  attrOf2,
  terciles,
  bounds = NULL,
  palette = NULL
)

Arguments

starsObj1

a stars object

attrOf1

which attribute of starsObj1 should be considered?

starsObj2

a stars object

attrOf2

which attribute of starsObj2 should be considered?

terciles

should terciles be calculated?

bounds

if custom bounds/levels are desired, default NULL

palette

see Vizumap::build_palette if a custom palette is desired

Value

a data frame of the attributes, factor levels, and color (in hexadecimal)

Examples

1
2
3
4
out <- st_assign_colors(tmax, 1, tmin, 1, terciles = FALSE)
data <- out$data
colors <- out$colors
bounds <- out$bounds

JamesMCollier/densityviz documentation built on Dec. 18, 2021, 12:31 a.m.