custom_color: Customise color

Description Usage Arguments

Description

Customise color

Usage

1
2
3
4
5
6
custom_color(
  feature_vec,
  aes_param = list(color_vec = NULL, date_color_vec = NULL),
  remove_NA = T,
  regexp = NULL
)

Arguments

feature_vec

a vector of factors or characters of the names to plot

aes_param

aesthetic parameters. The most important of which is color_vec, a named vector for the colors with the names corresponding to those in feature_vec. This needs not to be an exhaustive list. Any names in feature_vec but not in color_vec will be automatically colored.

remove_NA

remove NA values from feature_vec, i.e., do not color the NA values

regexp

which parts of the string in feature_vec to remove, in order for it to match color_vec. This setting is useful when you try to cope with varying names with the same color_vec.


Yutong441/TBdev documentation built on Dec. 18, 2021, 8:22 p.m.