col.fun: Color Specification

View source: R/shade.fun.r

col.funR Documentation

Color Specification

Description

Choose a type of color that helps read the map nicely.

Usage

col.fun(
  data,
  color.index,
  display = "hue",
  na.fill = "#F4A460",
  offset = 0,
  col = "red"
)

Arguments

data

a numeric vector that should lie on the range of [0,1].

color.index

an integer vector from inzshapemap object.

display

a character value, the method for display colors. It should be choosen by one of the following display method: "hcl","hue","heat","rainbow","terrain","topo","cm","gray","r","n","e".

na.fill

a character value that specify the color that use to fill the unmatch region/country.

offset

a numeric value within the range of [0,1] .

col

the color for fill the match region/country, it only needs to be specify if display = 'hue'.

Details

hcl,HCL Color Specification, whith c = 35 and l = 85 see hcl. hue, when display = 'hue', then the 'col' arg need to be specified. The alpha will depend on the data, see rgb. rainbow,terrain,topo,cm are the method from RColorBrewer. r,n , the color filled randomly expect n will fill the entire map even the region is unmatch. e, equal color for all matched region.

Value

A color vector.

Author(s)

Jason Wen


iNZightVIT/iNZightMaps documentation built on Feb. 3, 2024, 4:42 p.m.