Learn R Programming

berryFunctions (version 1.11.0)

logHist: Histogram of logarithmic values

Description

Draw histogram of values on a logarithmic scale with nice axis labels

Usage

logHist(x, logargs = NULL, main = xmain, xlab = xname, col = "tan", ...)

Arguments

x
Vector of numerical values
logargs
A list of arguments passed to logAxis. DEFAULT: NULL
main
Title of graph, internally from x. DEFAULT: internal name representation
xlab
X axis label. DEFAULT: internal: name of x
col
Color of histogram bars
...
further arguments passed to hist like breaks, freq, xlim=c(-1,3), ..., but not xaxt or add.

Value

none

See Also

logAxis, hist

Examples

Run this code

dat <- rbeta(1e4, 2, 18)*100
hist(dat, col="tan", breaks=50)
logHist(dat, breaks=50)
logHist(dat,xlim=c(0,2)) # xlim in powers of ten
logHist(c(-1,0,1,2,2,3,3,4,8,10,50)) # warning for negative values

Run the code above in your browser using DataLab