show_palettes | R Documentation |
This function displays color palettes using ggplot2.
show_palettes(
palettes = NULL,
type = c("discrete", "continuous"),
index = NULL,
palette_names = NULL,
return_names = TRUE,
return_palettes = FALSE
)
palettes |
A list of color palettes. If 'NULL', uses default palettes. |
type |
A character vector specifying the type of palettes to include. Default is "discrete". |
index |
A numeric vector specifying the indices of the palettes to include. Default is 'NULL'. |
palette_names |
A character vector specifying the names of the SCP palettes to include. Default is 'NULL'. |
return_names |
A logical value indicating whether to return the names of the selected palettes. Default is 'TRUE'. |
return_palettes |
A logical value indicating whether to return the colors of selected palettes. Default is 'FALSE'. |
palette_scp
palette_list
show_palettes(palettes = list(c("red", "blue", "green"), c("yellow", "purple", "orange")))
all_palettes <- show_palettes(return_palettes = TRUE)
names(all_palettes)
all_palettes[["simspec"]]
show_palettes(index = 1:10)
show_palettes(type = "discrete", index = 1:10)
show_palettes(type = "continuous", index = 1:10)
show_palettes(palette_names = c("Paired", "nejm", "simspec", "Spectral", "jet"), return_palettes = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.