Blame | Last modification | View Log | Download | RSS feed
\name{points}\title{Add Points to a Plot}\usage{points(x, y, pch="o", \dots)points.default(x, y=NULL, pch=1, col="black", \dots)}\alias{points}\alias{points.default}\arguments{\item{x, y}{coordinate vectors of points to plot.}\item{pch}{plotting 'character', i.e. symbol to use. \code{pch} caneither be a \code{\link{character}} or an integer code for a set ofgraphics symbols. The full set of S symbols is available with \code{pch=0:18}.In addition, there is a special set of R plotting symbols whichcan be obtained with \code{pch=19:25} and can be colored and filledwith different colors:\code{pch=19}: solid circle,\code{pch=20}: bullet,\code{pch=21}: circle,\code{pch=22}: square,\code{pch=23}: diamond,\code{pch=24}: triangle point-up,\code{pch=25}: triangle point down.}\item{col}{color to use.}\item{\dots}{Further graphical parameters (see \code{\link{par}}) mayalso be supplied as arguments.}}\description{\code{points} is a generic function to draw a sequence of points at thespecified coordinates.The specified character(s) are plotted, centered at the coordinates.Graphical parameters are permitted as arguments to this function.}\seealso{\code{\link{plot}}, \code{\link{lines}}.}\examples{plot(-4:4, -4:4, type = 'n')# setting up coord. systempoints(rnorm(200), rnorm(200), col = 'red')points(rnorm(100)/2, rnorm(100)/2, col = 'blue', cex = 1.5)## Showing all the graphics symbolsipch <- 1:25iy <- 3 + 4-(ipch-1) \%\% 5ix <- (ipch-1) \%/\% 5plot(ix, iy, type='n', axes = F, xlab = '', ylab = '',main = 'plot symbols : points (.. pch = * )')abline(v=ix, h=iy, col = "lightgray", lty = "dotted")for(i in ipch) { # red symbols with a yellow interior (where available)points(ix[i], iy[i], pch=i, col="red", bg="yellow", cex = 15)text (ix[i] - .3, iy[i], i, col="brown", cex = 1.5)}}\keyword{aplot}