plot.histde | R Documentation |
Plot for histogram density estimate for 1- and 2-dimensional data.
## S3 method for class 'histde'
plot(x, ...)
x |
object of class |
... |
other graphics parameters:
|
For histde
objects, the function headers for the different dimensional data are
## univariate plot(fhat, xlab, ylab="Density function", add=FALSE, drawpoints=FALSE, col.pt=4, jitter=FALSE, border=1, alpha=1, ...) ## bivariate plot(fhat, breaks, nbreaks=11, xlab, ylab, zlab="Density function", cex=1, pch=1, add=FALSE, drawpoints=FALSE, col, col.fun, alpha=1, col.pt=4, lty.rect=2, cex.text=1, border, lwd.rect=1, col.rect="transparent", add.grid=TRUE, ...)
The 1-d plot is a standard plot of a histogram generated by hist
. If
drawpoints=TRUE
then a rug plot is added.
The 2-d plot is similar to the display="filled.contour"
option from
plot.kde
with the default nbreaks=11
contour
levels.
Plots for 1-d and 2-d are sent to graphics window.
plot.kde
data(iris)
## univariate example
fhat <- histde(x=iris[,2])
plot(fhat, xlab="Sepal length")
## bivariate example
fhat <- histde(x=iris[,2:3])
plot(fhat, drawpoints=TRUE)
box()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.