qrmtools (version 0.0-12)

edf_plot: Plot of an Empirical Distribution Function

Description

Plotting an empirical distribution function.

Usage

edf_plot(x, do.points = length(x) 

Arguments

x

numeric vector of data (of which the empirical distribution function is to be plotted).

do.points

logical indicating whether points are to be plotted; see ?plot.stepfun.

log

character indicating whether a logarithmic x-axis is used (available are only "" and "x").

xlim

x-axis limits; default range(x) avoids possible failure if log = "x" and data points are all positive (plot.stepfun() extends the range, possibly below 0).

main

title.

xlab

x-axis label.

ylab

y-axis label.

additional arguments passed to the underlying plot.stepfun().

Value

Returns the return value of the underlying plot.stepfun().

Examples

Run this code
# NOT RUN {
x <- c(5, 2, 4, 2, 3, 2, 2, 2, 1, 2) # example data
edf_plot(x, verticals = FALSE) # the 'mathematical' version
edf_plot(x, do.points = FALSE) # good for many sample points
edf_plot(x) # the default
edf_plot(x, log = "x") # logarithmic
(edf_plot(x, log = "x")) # ... with return value
## Note: flat part below first jump cannot be shown in log-scale
# }

Run the code above in your browser using DataLab