powered by
Scatter plot, with variable-based point colours
colplot( x, y, z, n = 20, rev = TRUE, cex = 1, pch = 21, add = FALSE, breaks = NULL )
a vector of x coordinates
a vector of y coordinates
a variable for defining colours
an integer giving the number of colour levels, supplied to pretty
logical: should the palette be reversed? Defaults to TRUE
TRUE
a scalar for character expansion, supplied to plot
an integer giving the plotting character, supplied to plot
logical: add to an existing plot? Defaults to FALSE
FALSE
a vector or breaks for defining color intervals; defaults to NULL, so pretty and n are used on z
NULL
n
z
A plot
# NOT RUN { x <- runif(50) y <- runif(50) colplot(x, y, x * y) # }
Run the code above in your browser using DataLab