viridis_palette: Viridis Palette Function

Description Usage Arguments Details Value See Also Examples

View source: R/palettes.R

Description

A function that returns a color palette function based off of the viridis package.

Usage

1
2
viridis_palette(viridis_palette = "viridis", viridis_number = 800,
  viridis_range = 0:viridis_number)

Arguments

viridis_palette

The viridis palette to use. Default: 'viridis'

viridis_number

The number of colors to use in the viridis palette. Default: 800

viridis_range

The range in the color palette to use. Default: c(0, viridis_number)

Details

The purpose of this function is to provide an interpolated viridis palette for using with the get_color_palette function.

Value

The output of this function is another function (grDevoces::colorRampPalette), which takes a number to generate an interpolated color palette as a character vector.

See Also

colorRamp

viridis

Other Color Palettes: combination_palette, get_color_palette, scico_palette, viridis_magma_palette

Examples

1
2
3
4
5
6
7
8
## Not run: 
if(interactive()){
library(MicrobiomeR)
basic_pal <- viridis::viridis(n=25, option="magma")
better_pal <- get_color_palette(pal_func = viridis_palette, color_no = 25)
 }

## End(Not run)

vallenderlab/MicrobiomeR documentation built on Aug. 30, 2019, 11:24 p.m.