scico | R Documentation |
This function constructs palettes of the specified size based on the colour
maps developed by Fabio Crameri. It follows the same API style as viridis()
from the viridisLite
package so anyone familiar with this package can
easily adapt to that.
scico(
n,
alpha = NULL,
begin = 0,
end = 1,
direction = 1,
palette = "bilbao",
categorical = FALSE
)
n |
The number of colours to generate for the palette |
alpha |
The opacity of the generated colours. If specified rgba values
will be generated. The default ( |
begin, end |
The interval within the palette to sample colours from.
Defaults to |
direction |
Either |
palette |
The name of the palette to sample from. See
|
categorical |
Boolean. Should the categorical palettes be returned |
A character vector of length n
with hexencoded rgb(a) colour values
http://www.fabiocrameri.ch/colourmaps.php
Crameri, Fabio. (2021, September 12). Scientific colour maps (Version 7.0.1). Zenodo. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.5281/zenodo.5501399")} Crameri, Fabio. (2018). Geodynamic diagnostics, scientific visualisation and StagLab 3.0. Geosci. Model Dev. Discuss. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.5194/gmd-2017-328")}
# Use the default palette
scico(15)
# Flip the direction
scico(15, direction = -1)
# Take a subset of a palette
scico(15, begin = 0.3, end = 0.6, palette = 'berlin')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.