I have a data set, which I have used to make a scatter plot and I would like to assign three different colors to the data points within three different regions, based on the
I like the cut approach:
cut
set.seed(1) x <- sample(1600) col <- c("red", "black", "purple") col <- col[cut(x, breaks=c(-Inf, 3, 1549, Inf))]