\Header{plot.histogram}{Plot Histograms}
\alias{lines.histogram}{plot.histogram}
\keyword{hplot}{plot.histogram}
\keyword{iplot}{plot.histogram}
\begin{Description}\relax
These are methods for objects of class \code{"histogram"}, typically
produced by \code{\Link{hist}(...)}.  See that page for information
about the components of \code{x}.

\code{lines.histogram(*)} is the same as
\code{plot.histogram(*, add = TRUE)}.\end{Description}
\begin{Usage}
\begin{verbatim}
plot.histogram(x, freq = equidist, col = NULL, border = par("fg"),
               lty = NULL, main = paste("Histogram of", x$xname),
               xlim = range(x$breaks), ylim = range(y, 0),
               xlab = x$xname, ylab, axes = TRUE, labels = FALSE,
               add = FALSE, ...)

lines.histogram(x, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a \code{histogram} object, or a list with components
\code{intensities}, \code{mid}, etc, see \code{\Link{hist}}.
\item[\code{freq}] logical; if \code{TRUE}, the
histogram graphic is to present a representation of frequencies, i.e,
\code{x\$counts}; if \code{FALSE}, \emph{relative} frequencies
(``probabilities''), i.e., \code{x\$intensities}, are plotted.  The
default is true for equidistant \code{breaks} and false otherwise.
\item[\code{col}] a colour to be used to fill the bars.  The default of
\code{NULL} yields unfilled bars.
\item[\code{border}] the color of the border around the bars.
\item[\code{lty}] the line type used for the bars, see also \code{\Link{lines}}.
\item[\code{xlim, ylim}] the range of x and y values with sensible defaults.
\item[\code{main, xlab, ylab}] these arguments to \code{title} have useful
defaults here.
\item[\code{axes}] logical, indicating if axes should be drawn.
\item[\code{labels}] logical or character.  Additionally draw labels on top of bars,
if not \code{FALSE}; if \code{TRUE}, draw the counts or rounded
intensities; if \code{labels} is a \code{character}, draw itself.
\item[\code{add}] logical.  If \code{TRUE}, only the bars are added to the
current plot.  This is what \code{lines.histogram(*)} does.
\item[\code{...}] further graphical parameters to \code{title} and \code{axis}.
\end{ldescription}
\end{Arguments}
\begin{SeeAlso}\relax
\code{\Link{hist}},
\code{\Link{stem}},
\code{\Link{density}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(women)
str(wwt <- hist(women$weight, nc= 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"))
\end{ExampleCode}
\end{Examples}

