db_colors: Vectors of colors for figures

Description Usage Arguments Value Examples

View source: R/db_colors.R

Description

Creates different vecotrs of related colors than may be useful for figures

Usage

1
db_colors(set = c("basic", "procare", "CCalt", "sex"))

Arguments

set

Character string indicating a set of colors

Value

Vector of character strings representing the chosen set of colors, in Hex.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plot(0, 0, type="n", xlab="", ylab="", xlim=c(0, 6), ylim=c(7, 0), yaxs="i",
     xaxt="n", yaxt="n", xaxs="i")
sex <- db_colors("sex")
points(seq(along=sex), rep(6,length(sex)), pch=21, bg=sex, cex=4)
text(seq(along=sex), rep(5, length(sex)), names(sex))

basic <- db_colors('basic')
points(seq(along=basic), rep(4,length(basic)), pch=21, bg=basic, cex=4)
text(seq(along=basic), rep(3, length(basic)), names(basic))

basic <- db_colors('procare')
points(seq(along=basic), rep(2,length(basic)), pch=21, bg=basic, cex=4)
text(seq(along=basic), rep(1, length(basic)), names(basic))

Beachnad/dbr documentation built on Nov. 6, 2019, 8:07 p.m.