draw.one.density: Translate density into colour, for graphix representation.

Description Usage Arguments Value Examples

View source: R/plot_dyn_profile.R

Description

Translate density into colour, for graphix representation.

Usage

1
2
draw.one.density(d, ylim = range(d$x), xlim = c(0, 1), nstripes = 1000,
  colors = c("white", "darkblue"), ncolors = 100)

Arguments

d

A density function, as returned by density()

ylim

The limite of the drawned box on the Y axis, default is range(d$x)

xlim

The limite of the drawned box on the X axis, default is c(0,1)

nstripes

(integer) The number of horizontal stripes to plot per experiment, default is 1000

colors

The colors to use to construct the ramp, default is c("white", "darkblue")

ncolors

(integer) The number of gradual colors of the ramp, default is 100

Value

The colors and coordinates to use to plot a given density

Examples

1
2
3
4
5
6
7
8
d = density(x=1:1000)
ylim = range(d$x)
xlim = c(0,1)
nstripes = 1000
colors = c("white", "darkblue"),
ncolors = 100
plot(1:2, xlim = xlim, ylim = ylim, type = "n")
draw.one.density (d, ylim, xlim, nstripes, colors, ncolors)

magrichard/facsticor documentation built on May 17, 2019, 8:16 a.m.