Learn R Programming

evgam (version 0.1.1)

colplot: Scatter plot, with variable-based point colours

Description

Scatter plot, with variable-based point colours

Usage

colplot(
  x,
  y,
  z,
  n = 20,
  rev = TRUE,
  cex = 1,
  pch = 21,
  add = FALSE,
  breaks = NULL
)

Arguments

x

a vector of x coordinates

y

a vector of y coordinates

z

a variable for defining colours

n

an integer giving the number of colour levels, supplied to pretty

rev

logical: should the palette be reversed? Defaults to TRUE

cex

a scalar for character expansion, supplied to plot

pch

an integer giving the plotting character, supplied to plot

add

logical: add to an existing plot? Defaults to FALSE

breaks

a vector or breaks for defining color intervals; defaults to NULL, so pretty and n are used on z

Value

A plot

Examples

Run this code
# NOT RUN {
x <- runif(50)
y <- runif(50)
colplot(x, y, x * y)

# }

Run the code above in your browser using DataLab