I'm just starting to use R and I'm trying to make a scatter plot which has different colors based on different attributes. For example:
data.a = 1:5
data.b = 1:5
data.c = c("yes", "no", "yes", "maybe", "no")
plot(data.a, data.b)
I want to have a legend which is different colors for points which are "yes", "no", and "maybe" for data.c. I would also like points to be the colors in the legend.