View source: R/color-paletts.R
segments_gradient | R Documentation |
Draw segments colored by gradients
segments_gradient(
x,
y = NULL,
col = colorRamp2(c("transparent", "black"), TRUE),
lend = 1,
...
)
x , y |
Coordinates passed to grDevices::xy.coords. |
col |
Color ramp function (see grDevices::colorRamp). |
lend |
Passed to graphics::segments. |
... |
Further arguments passed to |
See graphics::segments.
set.seed(1)
x <- cbind(cumsum(rnorm(1e3, sd=.1)), cumsum(rnorm(1e3, sd=.4)))
plot(x, type="n")
segments_gradient(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.