gg_color_hue: Reproduce the ggplot2 default color palette

View source: R/Seurat.Utils.Visualization.R

gg_color_hueR Documentation

Reproduce the ggplot2 default color palette

Description

Generates a vector of colors that emulates the default color palette used by ggplot2. This function is useful for creating color sets for custom plotting functions or for applications outside of ggplot2 where a similar aesthetic is desired.

Usage

gg_color_hue(n)

Arguments

n

Integer specifying the number of distinct colors to generate.

Value

A character vector of color values in hexadecimal format, replicating the default hue color scale of ggplot2.

Examples

## Not run: 
# Generate a palette of 5 colors
print(gg_color_hue(5))

## End(Not run)


vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.