pal_plot-m: Display color palettes in a plot

Description Usage Arguments Examples

Description

pal_plot create an excellent visualization for finding the color palette that best suit your interests.

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'character'
pal_plot(x, return = 25, plotly = TRUE)

## S4 method for signature 'list'
pal_plot(x, return = 25, plotly = TRUE)

## S4 method for signature 'pal'
pal_plot(x, return = 25, plotly = TRUE)

Arguments

x

character vector,list or pal object; if x is a character vector or a list must be in hexadecimal notation or a built-in color names which R knows about (see colors()).

return

numeric; Number of palettes to be returned in the plot.

plotly

logical; TRUE/FALSE whether a plotly plot must be returned.

Examples

1
2
3
4
5
6
7
8
9
#list
pal1 <- c("#2F3869","#A9ABC6","#ECFC96","#B8A75E")
pal2 <- c("#1E5CB4","#54C7CF","#FED71C","#A5262C")
palettes <- list(pal001 = pal1, pal002 = pal2)
pal_plot(palettes,plotly = TRUE)

#character
pal <- c('blue','red','yellow')
pal_plot(pal,plotly = FALSE)

csaybar/pal documentation built on May 4, 2019, 6:30 a.m.