PlotECDF: Empirical Cumulative Distribution Function
Description
Faster alternative for plotting the empirical cumulative distribution function.
The function offers the option to construct ecdf on the base of a histogram, which makes sense, when x is large. So the plot process is much faster, without loosing much precision in the details.
will be passed directly to hist. If left to NULL, no histogram will be used.
col
color of the line.
ylab
label for the y-axis.
lwd
line width.
xlab
label for the x-axis.
cex.axis
cex for the axis
...
arguments to be passed to subsequent functions.
Value
no value returned, use plot.ecdf if any results are required.
Details
The stats function plot.ecdf is fine for vectors that are not too large. However for n ~ 1e7 it will be real slow. PlotECDF is designed as alternative for quicker plotting the ecdf for larger vectors. If breaks are provided as argument, a histogram with that number of breaks will be calculated and the ecdf will use those frequencies instead of respecting every single point.
Note that a plot will rarely need more than ~1'000 points on x to be quite precise. PlotFdist will use this number of breaks by default.