So, I am very new to R, so excuse my question's idiotic nature. So, currently my data is plotting as such:
which is fine and dandy, except that the operator values are 1071361 & 1116576. The client wants the legend to specify only the specific operator values and not the gradient between the values. The operator values can be different from dataset to dataset in value and number, so I cannot hard code them. Currently, I have the points as such:
g = ggplot(DAT, aes(x=Date, y=Value))
g = g + geom_point(aes(colour=Operator)) + guides(col = guide_legend(override.aes = list(fill = unique(DAT$Operator))))
Does the following achieve your goal?
DAT$Operator <- as.factor(as.character(DAT$Operator)) g = ggplot(DAT, aes(x=Date, y=Value)) g = g + geom_point(aes(colour=Operator))