Learn R Programming

OpenRepGrid (version 0.1.9)

stepChart: Density histogram withs steps instead of bars

Description

Make a histogram with steps instead of bars. Densities are used for the heights.

Usage

stepChart(vals, breaks = "Sturges", add = FALSE, ...)

Arguments

vals
Numeric values to display.
breaks
Passed on to hist. See ?hist parameter breaks for more information.
add
Whether to add the steps to an existing plot (FALSE) or to create a new plot (default add=TRUE).

Examples

Run this code
## Not run: 
# 
#    x <- rnorm(1000)
#    y <- rnorm(1000, sd=.6)
#    stepChart(y, breaks=50)
#    stepChart(x, add=T, breaks=50, col="red")
# ## End(Not run)

Run the code above in your browser using DataLab