Learn R Programming

lshorth (version 0.1-6)

plot.lshorth: plot.lshorth

Description

Plot local shorth length

Usage

"plot"(x, y, xlim = NULL, ylim = NULL, probs = NULL, main = "Shorth", xlab=NULL, ylab=NULL, frame.plot=TRUE, legendpos="topright", rug=TRUE, rescale="neg", ...)

Arguments

x
an object of class lshorth, or a vector of x values.
y
a matrix of shorth length, if x is not of class lshorth -- not yet implemented.
xlim
passed to plot.
ylim
passed to plot.
probs
coverage probabilities, if x is not of class lshorth -- not yet implemented.
main
passed as argument to title.
xlab
a label for the x axis.
ylab
a label for the y axis.
frame.plot
a logical indicating whether a box should be drawn around the plot.
legendpos
position, passed to legend, or NULL for no legend.
rug
logical. If TRUE, a rug is included.
rescale
rescaling method:one of "none","neg","std","inv".
...
additional arguments passed to plot.

Value

an object of class lshorth. See lshorth.

Details

For each point in x the length of the shortest interval covering a fraction p of the data is marked. The internal function legend.lshorth() gives a model how to customize the legend.

Examples

Run this code
library(lshorth)

shorthnorm <- lshorth(rnorm(50), plot=FALSE)
plot.lshorth(shorthnorm, legend="bottom")

Run the code above in your browser using DataLab