Data Science Desktop Survival Guide
by Graham Williams
Scatter Plot Colour
ggplot(aes(x=min_temp, y=max_temp, colour=rain_tomorrow)) +
labs(x = vnames["min_temp"],
y = vnames["max_temp"],
colour = vnames["rain_tomorrow"])
The colour is added simply by specifying a further aesthetic, colour=rain_tomorrow. This results in the different values of the variable rain_tomorrow being coloured differently.