cdfplot: CDF plot

Description Usage Arguments Author(s) Examples

View source: R/MTfuncs_all.R

Description

Produces an empirical CDF plot of up to five vectors (this can be biggerized)

Usage

1
2
3
cdfplot(a, b = NULL, c = NULL, d = NULL, e = NULL, lty = 0, lwd = 1,
  col = 1, xlab = "", ylab = "Cumulative Proportion", main = "",
  labels = NULL, yinfl = 1, showN = TRUE, ...)

Arguments

a

Input vector

b

Input vector

c

Input vector

d

Input vector

e

Input vector

lty

Line type. Accepts one value or a vector of values for each line. Specifying zero will automatically generate one line type for each line.

lwd

Line width. Accepts one value or a vector of values for each line. Specifying zero will automatically generate one line width for each line.

col

Line color. Accepts one value or a vector of values for each line. Specifying zero will automatically generate one line color for each line.

xlab

Just like usual

ylab

Just like usual

main

Just like usual

labels

A vector of labels for the legend.

yinfl

Inflation factor for determining plotting window size. Setting yinfl=1 will use the maximum CDF value (1). Setting it slightly higher allows more space for a legend.

showN

Whether to include sample sizes in the legend. Defaults to TRUE.

...

Additional plotting arguments

Author(s)

Matt Tyers

Examples

1
2
3
4
5
a <- rnorm(100)
b <- rnorm(100)
c <- rnorm(100,1,1)
d <- rnorm(100,0,2)
cdfplot(a,b,c,d,labels=c("apples","bananas","cucumbers","durians"),lty=1,col=1:4)

mbtyers/MTfuncs documentation built on May 22, 2019, 12:58 p.m.