Learn R Programming

ggDoE (version 0.8)

viridisPalette: Simple viridisLite wrapper

Description

Simple viridisLite wrapper

Usage

viridisPalette(
  total_colors,
  color_palette = "viridis",
  alpha = 1,
  direction = 1
)

Value

Specified color palette of length `total_colors`

Arguments

total_colors

number of colors desired

color_palette

A character string indicating the color map option to use. Eight options are available: "viridis","cividis","magma","inferno","plasma","rocket","mako","turbo"

alpha

The alpha transparency, a number in [0,1]

direction

Sets the order of colors in the scale. If 1, the default, colors are ordered from darkest to lightest. If -1, the order of colors is reversed

Examples

Run this code
viridisPalette(5)
viridisPalette(5,color_palette='magma',alpha=0.5)
viridisPalette(5,color_palette='plasma',alpha=0.6,direction=-1)

Run the code above in your browser using DataLab