get_gg_colors: Get character vector of ggplot colors in default order

View source: R/global.R

get_gg_colorsR Documentation

Get character vector of ggplot colors in default order

Description

Given a character or numeric vactor x , the function returns the named vector of default ggplot colors of length length(x). The names will be elements of x and values will be unique color associated to each element of x.

Usage

get_gg_colors(x)

Arguments

x

internal

Value

internal

Examples

## Not run: 
x <- letters[1:5]
gg_col = get_gg_colors(x)

## visualize colors 
pie(seq_len(length(x)) / seq_len(length(x)) ,labels = x , col=gg_col) 

y <- LETTERS[ 1:5]

visualize colors 
get_gg_colors(y)
pie(seq_len(length(y)) / seq_len(length(y)) ,labels = y , col=gg_col)

## End(Not run) 

cparsania/FungiExpresZ documentation built on March 15, 2024, 5:48 p.m.