Learn R Programming

scCustomize (version 3.0.0)

PalettePlot: Plot color palette in viewer

Description

Plots given color vector/palette in viewer to evaluate palette before plotting on data.

Usage

PalettePlot(pal = NULL, label_color_num = NULL)

Value

Plot of all colors in supplied palette/vector

Arguments

pal

a vector of colors (either named colors of hex codes).

label_color_num

logical, whether or not to numerically label the colors in output plot. Default is TRUE is number of colors in pal is less than 75 and FALSE is greater than 75.

References

Adapted from colorway package build_palette internals (License: GPL-3). https://github.com/hypercompetent/colorway.

Examples

Run this code
pal <- DiscretePalette_scCustomize(num_colors = 36, palette = "varibow")
PalettePlot(pal = pal)

Run the code above in your browser using DataLab