segments_gradient: Draw segments colores by gradients

Description Usage Arguments Examples

View source: R/color-palettes.R

Description

Draw segments colores by gradients

Usage

1
2
3
4
5
6
7
segments_gradient(
  x,
  y = NULL,
  col = colorRamp2(c("transparent", "black"), TRUE),
  lend = 1,
  ...
)

Arguments

x, y

Coordinates passed to grDevices::xy.coords.

col

Color ramp function (see grDevices::colorRamp).

lend

Passed to graphics::segments.

...

Further arguments passed to segments.

Examples

1
2
3
4
set.seed(1)
x <- cbind(cumsum(rnorm(1e3, sd=.1)), cumsum(rnorm(1e3, sd=.4)))
plot(x, type="n")
segments_gradient(x)

USCbiostats/polygons documentation built on May 27, 2021, 2:34 a.m.