I am trying to define the colours of groups of points plotted in ggplot. I adapted code from this post:
Color ggplot points based on defined color codes
but
Sven beat me by a few secs, but slightly different:
df.unique <- unique(df[, c("zone", "color.names")]) p + scale_colour_manual(breaks = df.unique$zone, values = as.character(df.unique$color.names))