highlight {NCStats}R Documentation

Labels a list of points on a two-dimensional plot.

Description

Labels a list of points on a two-dimensional plot.

Usage

highlight(x,y=NULL,pts,col="red",cex=1.25)

Arguments

x The vector of x coordinates or a formula of the form y~x.
y The vector of y coordinates.
pts The vector of row numbers corresponding to the points to highlilght.
col A number or string indicating the color to use when labeling the points.
cex A characther expansion number for the point labels.

Details

A two dimensional plot must be active and the x and y vectors must correspond to the x- and y-axes of the plot.

Value

None, but an active graphic is modified.

Author(s)

Derek H. Ogle, dogle@northland.edu.

Examples

x <- rnorm(50)
y <- runif(50)
plot(y~x)

# highlights 1st, 10th and 25th points
highlight(x,y,c(1,10,25))

# highlight 5th, 15th, and 30th points
highlight(y~x,pts=c(5,15,30),col="blue")

[Package NCStats version 0.0-12 Index]