tectonicr.colors | R Documentation |
assigns colors to continuous or categorical values for plotting
tectonicr.colors(
x,
n = 10,
pal = NULL,
categorical = FALSE,
na.value = "grey",
...
)
x |
values for color assignment |
n |
integer. number of colors for continuous colors (i.e. 'categorical = FALSEā). |
pal |
either a named vector specifying the colors for categorical
values, or a color function. If |
categorical |
logical. |
na.value |
color for |
... |
optional arguments passed to palette function |
named color vector
val1 <- c("N", "S", "T", "T", NA)
tectonicr.colors(val1, categorical = TRUE)
tectonicr.colors(val1, pal = stress_colors(), categorical = TRUE)
val2 <- runif(10)
tectonicr.colors(val2, n = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.