Simply use the col paramater, with a factor to index the colors. Example: # generate some data x <- rnom(100) y <- rnorm(x) z <- as.factor(rbinom(x,1,0.5)) # plot plot(x,y, col=c('red','blue')[z]) HTH, Matthieu