Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

segments_gradient

Draw segments colored by gradients


Description

Draw segments colored by gradients

Usage

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.

Value

Examples

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

netplot

Beautiful Graph Drawing

v0.1-1
MIT + file LICENSE
Authors
George Vega Yon [aut, cre] (<https://orcid.org/0000-0002-3171-0844>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.