get_cols: Get n colors

View source: R/plots.R

get_colsR Documentation

Get n colors

Description

Get n colors

Usage

get_cols(n = 11, pal = NULL, n_break = 5)

Arguments

n

how many colors you need

pal

"col1", "col2", "col3"; or a vector of colors, you can get from: RColorBrewer::brewer.pal(5,"Set2") or ggsci::pal_aaas()(5)

n_break

default: 5

Value

a vector of n colors

Examples

get_cols(10, "col2") -> my_cols
scales::show_col(my_cols)

scales::show_col(get_cols(15, RColorBrewer::brewer.pal(5, "Set2")))


pcutils documentation built on June 26, 2024, 1:06 a.m.