| step_plot | R Documentation | 
Plotting step functions, empirical distribution functions and empirical quantile functions.
step_plot(x, y, y0 = NA, x0 = NA, x1 = NA, method = c("edf", "eqf"), log = "",
          verticals = NA, do.points = NA, add = FALSE,
          col = par("col"), main = "", xlab = "x", ylab = "Function value at x",
          plot.args = NULL, segments.args = NULL, points.args = NULL)
edf_plot(x, y0 = 0, x0 = NA, x1 = NA, log = "",
         verticals = NA, do.points = NA, col = par("col"),
         main = "", xlab = "x", ylab = "Distribution function at x", ...)
eqf_plot(x, y0 = NA, x0 = 0, x1 = 1, log = "",
         verticals = NA, do.points = NA, col = par("col"),
         main = "", xlab = "x", ylab = "Quantile function at x", ...)
x | 
  | 
y | 
 y-values corresponding to   | 
y0 | 
 y-value of the graph extending to the left of the first x-value.  | 
x0 | 
 smallest x-value.  | 
x1 | 
 largest x-value.  | 
method | 
 
  | 
log | 
 
  | 
verticals | 
 
  | 
do.points | 
 
  | 
add | 
 
  | 
col | 
 color (for   | 
main | 
 title.  | 
xlab | 
 x-axis label.  | 
ylab | 
 y-axis label.  | 
plot.args | 
 
  | 
segments.args | 
 
  | 
points.args | 
 
  | 
... | 
 additional arguments passed to the underlying
  | 
Nothing (plot by side-effect).
Marius Hofert
x <- c(5, 2, 4, 2, 3, 2, 2, 2, 1, 2) # example data
edf_plot(x) # empirical distribution function (edf)
edf_plot(x, log = "x")
edf_plot(x, verticals = TRUE)
edf_plot(x, do.points = FALSE)
cols <- c("black", "royalblue3")
edf_plot(list(x, x+2), col = cols) # edf with shifted edf
edf_plot(list(x, x+2), col = cols, x0 = 0.5, x1 = 7.5)
edf_plot(list(x, x+2), col = cols, x0 = 0.5, x1 = 7.5, verticals = TRUE)
eqf_plot(x) # empirical quantile function
eqf_plot(x, verticals = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.