"histogram"
, typically
produced by hist
.## S3 method for class 'histogram':
plot(x, freq = equidist, density = NULL, angle = 45,
col = NULL, border = par("fg"), lty = NULL,
main = paste("Histogram of",
paste(x$xname, collapse = "
")),
sub = NULL, xlab = x$xname, ylab,
xlim = range(x$breaks), ylim = NULL,
axes = TRUE, labels = FALSE, add = FALSE,
ann = TRUE, ...)## S3 method for class 'histogram':
lines(x, \dots)
histogram
object, or a list with components
density
, mid
, etc, see hist
for
information about the components of x
.TRUE
, the
histogram graphic is to present a representation of frequencies, i.e,
x$counts
; if FALSE
, relative frequencies
(probabilities), i.e., x$density
, are plotted. The
default is true for equidistant breaks
and false otherwise.NULL
yields unfilled bars.rect
.lines
.title
have useful
defaults here.FALSE
; if TRUE
, draw the counts or rounded
densities; if labels
is a character
, draw itself.TRUE
, only the bars are added to the
current plot. This is what lines.histogram(*)
does.title
and axis
.lines.histogram(*)
is the same as
plot.histogram(*, add = TRUE)
.hist
,
stem
,
density
.(wwt <- hist(women$weight, nclass = 7, plot = FALSE))
plot(wwt, labels = TRUE) # default main & xlab using wwt$xname
plot(wwt, border = "dark blue", col = "light blue",
main = "Histogram of 15 women's weights", xlab = "weight [pounds]")
## Fake "lines" example, using non-default labels:
w2 <- wwt; w2$counts <- w2$counts - 1
lines(w2, col = "Midnight Blue", labels = ifelse(w2$counts, "> 1", "1"))
Run the code above in your browser using DataLab