
Last chance! 50% off unlimited learning
Sale ends in
Number of cases in each location reflected in the point size
Points(x, y, pch=1, centers=FALSE, scale=1, cex.min=1, col=1, na.omit=TRUE, ...)
PPoints(groups, x, y, cols=as.numeric(groups), pchs=as.numeric(groups),
na.omit.all=TRUE, ...)
Coordinates
Point type
Types of point groups
If TRUE, show centers of each location as a pixel-size dot (pch=".")
Minimal point size
Color of points
Color of point groups
If TRUE (default), skip data points with NAs
If TRUE (default), skip data points and corresponding factor values with NAs, then make 'na.omit' for internal 'Points()' FALSE
Scale factor for point size
Factor defining groups
'Points()' passes other arguments to 'points()', 'PPoints()' passes other arguments to 'Points()'
Frequently, more then one data point is located in one coordinate place (so called "overplotting"). How to show overplotting? One way is 'jitter()', these is also (really advanced) 'sunflowerplot()'. 'Points()' does it in its own way: number of cases in each point will be reflected in the point size. 'Points()' is a low-level graphic function, analogous to 'points()'.
'PPoints()' is the same as 'Points()' but for multiple subgroups.
To prettify plot, it is recommended to change 'scale' and optionally also 'cex.min'.
Alternative is base R 'sunflowerplot()' but it is hard to read and there is no possibility to show multiple groups in data.
# NOT RUN {
## colors modified via palette()
plot(iris[, 1:2], type="n")
palette(rainbow(3))
PPoints(iris[, 5], iris[, 1], iris[, 2], pchs=0, scale=0.7)
palette("default")
## now with centers, colors default, pch by group, and one NA
iris[1, 1] <- NA
plot(iris[, 1:2], type="n")
PPoints(iris[, 5], iris[, 1], iris[, 2], scale=0.7, centers=TRUE)
data(iris) ## to restore default embedded object
# }
Run the code above in your browser using DataLab