I am trying to make a scatter plot coloured by factor. I am using the following code:
data<-iris
plot(data$Sepal.Length, data$Sepal.Width, col=data$Species)
Is there anyway I can colour by the species factor but specify my own custom colours? Having a look around on Google it seems it is possible to do using ggplot2 but I have never used it and was hoping I could do this using the basic R functions.
Any help would be greatly appreciated!