shadeArea: Plot a curve with a shaded area.

Description Usage Arguments Details Author(s) Examples

Description

Plot the curve for a given function, and shade the area below it between two given limits.

Usage

1
2
3
shadeArea(fun, xlim, shade.from = xlim[1], shade.to = xlim[2],
  length = 1000, curve.col = "blue", shade.col = "gray",
  shade.border = NA, draw.curve = TRUE, add = FALSE, ...)

Arguments

fun

function

xlim

min and max X value to plot the curve

shade.border

Border color. By default the border is not drawed (NA), to let the initial curve unchanged.

draw.curve

= TRUE If FALSE, only plot the shaded area

...

Additional parameters are passed to fun via lapply

shade.from=xlim[1]

min X value for the shaded area

shade.to=xlim[2]

max X value for the shaded area

length=1000

number of points for the polygon

shade.col="gray"

Shading color, passed to polygon()

add=FALSE

Add the shaded area to existing plot

Details

First version: 2015-03 Last modification: 2015-03

Author(s)

Jacques van Helden (Jacques.van-Helden@univ-amu.fr)

Examples

1
2
3
## Shade the interval (-1,1) below Student density function
z <- 3.5
shadeArea(dt, xlim=c(-5,+5), shade.from=-1, shade.to=1, df=4, curve.col="darkred", shade.col="#DDBBEE", shade.border="red")

jvanheld/stats4bioinfo documentation built on May 20, 2019, 5:16 a.m.