ramp: Create ramp widget

Description Usage Arguments Value Examples

View source: R/ramp.R

Description

Useful for showing continuous palettes

Usage

1
2
3
4
5
6
7
8
ramp(
  colors,
  n = 512,
  height = 40,
  margin = 0,
  background = NULL,
  elementId = NULL
)

Arguments

colors

character vector of CSS colors. Can be hex codes, etc.

n

numeric number of colors to interpolate into the ramp. Uses d3.interpolateRgbBasis() to interpolate.

height

numeric height of widget (pixels).

margin

numeric margin around the canvas (pixels).

background

character CSS color for the canvas background.

elementId

character ID for the enclosing element.

Value

htmlwidget

Examples

1

ijlyttle/splattr documentation built on Sept. 14, 2020, 12:04 a.m.