scico

0th

Percentile

Scientific colour map palettes

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.

Usage
scico(n, alpha = NULL, begin = 0, end = 1, direction = 1,
  palette = "bilbao")
Arguments
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 (NULL) will generate rgb values which corresponds to alpha = 1

begin, end

The interval within the palette to sample colours from. Defaults to 0 and 1 respectively

direction

Either 1 or -1. If -1 the palette will be reversed

palette

The name of the palette to sample from. See scico_palette_names() for a list of possible names

Value

A character vector of length n with hexencoded rgb(a) colour values

References

http://www.fabiocrameri.ch/colourmaps.php

Crameri, Fabio. (2018, May 8). Scientific colour maps (Version 3.0.1). Zenodo. doi:10.5281/zenodo.1243909 Crameri, Fabio. (2018). Geodynamic diagnostics, scientific visualisation and StagLab 3.0. Geosci. Model Dev. Discuss. doi:10.5194/gmd-2017-328

Aliases
  • scico
Examples
# NOT RUN {
# 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')

# }
Documentation reproduced from package scico, version 1.1.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.