Learn R Programming

jmuOutlier (version 2.2)

plotEcdf: Plotting Two Empirical Cumulative Distribution Functions

Description

Graphs one or two empirical cumulative distribution functions on the same plot.

Usage

plotEcdf(x, y = NULL, col = c("black", "red"))

Arguments

x

Vector of numerical observations whose empirical cdf is to be graphed.

y

Optional vector of observations whose empirical cdf is to be graphed.

col

Scalar or vector of length two, specifying the colors of the two empirical distribution functions. The two colors correspond to x and y, respectively, and preferably should differ. Type colors() for selections.

See Also

plot.ecdf

Examples

Run this code
# NOT RUN {
par( mfrow=c(2,2) )
plotEcdf( c(2,4,9,6), c(1,7,11,3,8) )
plotEcdf( c(2,4,9,6), c(1,7,11,3), col=c("navyblue", "orange") ) 
plotEcdf( c(11,5,3), c(3,7,9), col=c("tomato","darkgreen") ) 
plotEcdf( c(15,19,11,4,6), col="purple" ) 
par( mfrow=c(1,1) )
# }

Run the code above in your browser using DataLab