| highlight {NCStats} | R Documentation |
Labels a list of points on a two-dimensional plot.
highlight(x,y=NULL,pts,col="red",cex=1.25)
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. |
A two dimensional plot must be active and the x and y vectors must correspond to the x- and y-axes of the plot.
None, but an active graphic is modified.
Derek H. Ogle, dogle@northland.edu.
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")