palette_scp | R Documentation |
Color palettes collected in SCP.
palette_scp(
x,
n = 100,
palette = "Paired",
palcolor = NULL,
type = "auto",
matched = FALSE,
reverse = FALSE,
NA_keep = FALSE,
NA_color = "grey80"
)
x |
A vector of character/factor or numeric values. If missing, numeric values 1:n will be used as x. |
n |
The number of colors to return for numeric values. |
palette |
Palette name. All available palette names can be queried with |
palcolor |
Custom colors used to create a color palette. |
type |
Type of |
matched |
If |
reverse |
Whether to invert the colors. |
NA_keep |
Whether to keep the color assignment to NA in |
NA_color |
Color assigned to NA if NA_keep is |
show_palettes
palette_list
x <- c(1:3, NA, 3:5)
(pal1 <- palette_scp(x, palette = "Spectral"))
(pal2 <- palette_scp(x, palcolor = c("red", "white", "blue")))
(pal3 <- palette_scp(x, palette = "Spectral", n = 10))
(pal4 <- palette_scp(x, palette = "Spectral", n = 10, reverse = TRUE))
(pal5 <- palette_scp(x, palette = "Spectral", matched = TRUE))
(pal6 <- palette_scp(x, palette = "Spectral", matched = TRUE, NA_keep = TRUE))
(pal7 <- palette_scp(x, palette = "Paired", type = "discrete"))
show_palettes(list(pal1, pal2, pal3, pal4, pal5, pal6, pal7))
all_palettes <- show_palettes(return_palettes = TRUE)
names(all_palettes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.