color_palette {nestcolor} | R Documentation |
Color Palettes Used in NEST
Description
A standardized color palette to be used for all plots within the NEST project.
Usage
color_palette(n = 10, palette = "nest")
Arguments
n |
(
|
palette |
(
|
Value
A list of hex color code
Examples
library(grid)
plot_pal <- function(x) {
grid.newpage()
pushViewport(plotViewport(rep(1, 4)))
pushViewport(viewport(layout = grid.layout(1, ncol = length(x))))
for (i in seq_along(x)) {
grid.rect(
gp = gpar(fill = x[i], col = NA),
vp = viewport(layout.pos.col = i, layout.pos.row = 1)
)
}
}
plot_pal(color_palette(n = 10, palette = "nest"))
plot_pal(color_palette(n = 10, palette = "stream"))
plot_pal(color_palette(n = 10, palette = "viridis"))
plot_pal(color_palette(n = 10, palette = "accessible"))
[Package nestcolor version 0.1.2 Index]