R Language Base Plotting Empirical Cumulative Distribution Function


Example

A very useful and logical follow-up to histograms and density plots would be the Empirical Cumulative Distribution Function. We can use the function ecdf() for this purpose. A basic plot produced by the command

plot(ecdf(rnorm(100)),main="Cumulative distribution",xlab="x")

would look like enter image description here